When pressing the Left/Right-Shift key first, followed by any other key, the set of keys down returned by get_keys only contains the Left/Right-Shift key on the wayland build.
This is a program to demonstrate the issue:
use minifb::{Key, Window, WindowOptions, KeyRepeat};
fn main() {
let mut buffer: Vec<u32> = vec![0; 200*200];
let mut window = Window::new("", 200, 200, WindowOptions::default()).unwrap();
window.limit_update_rate(Some(std::time::Duration::from_micros(16600)));
loop {
if window.is_open() {
let keys = window.get_keys();
if keys.len() == 2 {
panic!("Received these two keys: {:?}", keys);
}
window
.update_with_buffer(&buffer, 200, 200)
.unwrap();
}
}
}
This program,
when run with only the 'x11' cargo feature:
does panic when LeftShift+L (LeftShift then L) is typed (desired behavior)
thread 'main' panicked at src/main.rs:13:17:
Received these two keys: [L, LeftShift]
when run with only the 'wayland' cargo feature:
does not panic when LeftShift+L (LeftShift then L) is typed (undesired behavior)
I have tested:
both builds on two wayland-compositors: sway & dwl (letting the compositor infer & start an xwayland server for the X11 builds)
The problem only occurs in the wayland builds, i.e. the program does not panic on the wayland builds.
the X11 build on two xorg window-managers: dwm & bspwmThe problem does not occur, i.e. the program does panic.
Additionally,
I tried both the latest crates.io version (v0.25.0) and git version (latest commit 29af982) of minifb
When pressing the Left/Right-Shift key first, followed by any other key, the set of keys down returned by get_keys only contains the Left/Right-Shift key on the wayland build.
This is a program to demonstrate the issue:
This program,
when run with only the 'x11' cargo feature:
when run with only the 'wayland' cargo feature:
I have tested:
Additionally,