You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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};fnmain(){letmut buffer:Vec<u32> = vec![0;200*200];letmut 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 & bspwm The 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
- Force minifb to build x11 window since wayland window currently has an
inconsistency with pressing shift keys, as reported in [this
issue](emoon/rust_minifb#349)
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,
I have tested:
The problem only occurs in the wayland builds, i.e. the program does not panic on the wayland builds.
The problem does not occur, i.e. the program does panic.
Additionally,
The text was updated successfully, but these errors were encountered: