Skip to content

Commit

Permalink
fix(linux/globalShortcut): disable on wayland
Browse files Browse the repository at this point in the history
Don't start the global shortcut thread on wayland, as its highly x11
specific and otherwise results in a segfault in libX11
  • Loading branch information
ralf1307 committed Aug 26, 2022
1 parent 816ca49 commit 0bfba18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform_impl/linux/global_shortcut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl ShortcutManager {
let (method_sender, thread_receiver) = channel::unbounded();
let (thread_sender, method_receiver) = channel::unbounded();

std::thread::spawn(move || {
if !_window_target.p.is_wayland() { std::thread::spawn(move || {
let event_loop_channel = event_loop_channel.clone();
let xlib = xlib::Xlib::open().unwrap();
unsafe {
Expand Down Expand Up @@ -159,7 +159,7 @@ impl ShortcutManager {
std::thread::sleep(std::time::Duration::from_millis(50));
}
}
});
});}

ShortcutManager {
shortcuts: hotkeys,
Expand Down

0 comments on commit 0bfba18

Please sign in to comment.