diff options
author | lukefromdc <[email protected]> | 2023-05-17 23:00:54 -0400 |
---|---|---|
committer | Luke from DC <[email protected]> | 2023-05-25 18:56:56 +0000 |
commit | 5688856331109e77d7362f5665fb178d1c269a39 (patch) | |
tree | 0f5b0b001fe68c5a5d5eab57e5c38cb3fa540546 /libcaja-private/caja-autorun.c | |
parent | 99a1e2a20567cbe988006d0fdfef6abab6324dc2 (diff) | |
download | caja-5688856331109e77d7362f5665fb178d1c269a39.tar.bz2 caja-5688856331109e77d7362f5665fb178d1c269a39.tar.xz |
Initial wayland support
Diffstat (limited to 'libcaja-private/caja-autorun.c')
-rw-r--r-- | libcaja-private/caja-autorun.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/libcaja-private/caja-autorun.c b/libcaja-private/caja-autorun.c index 2f79b16b..b78ea1c7 100644 --- a/libcaja-private/caja-autorun.c +++ b/libcaja-private/caja-autorun.c @@ -761,16 +761,22 @@ is_shift_pressed (void) Bool status; ret = FALSE; - display = gdk_display_get_default (); - gdk_x11_display_error_trap_push (display); - status = XkbGetState (GDK_DISPLAY_XDISPLAY (display), - XkbUseCoreKbd, &state); - gdk_x11_display_error_trap_pop_ignored (display); + if (GDK_IS_X11_DISPLAY (display)) + { + gdk_x11_display_error_trap_push (display); + status = XkbGetState (GDK_DISPLAY_XDISPLAY (display), + XkbUseCoreKbd, &state); + gdk_x11_display_error_trap_pop_ignored (display); - if (status == Success) + if (status == Success) + { + ret = state.mods & ShiftMask; + } + } + else { - ret = state.mods & ShiftMask; + ret=FALSE; } return ret; |