From 939bf23921cce4b934ecc2a98fa871c7538d0276 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 19 Oct 2024 23:49:22 +0200 Subject: Add screenshots --- gpu-screen-recorder-overlay-daemon/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gpu-screen-recorder-overlay-daemon') diff --git a/gpu-screen-recorder-overlay-daemon/main.c b/gpu-screen-recorder-overlay-daemon/main.c index bce9f2f..18234c2 100644 --- a/gpu-screen-recorder-overlay-daemon/main.c +++ b/gpu-screen-recorder-overlay-daemon/main.c @@ -40,6 +40,8 @@ static void sigterm_handler(int dummy) { } static const KeySym toggle_overlay_key = XK_Z; +static unsigned int toggle_overlay_modifiers = Mod1Mask; + static void grab_keys(Display *display) { unsigned int numlockmask = 0; KeyCode numlock_keycode = XKeysymToKeycode(display, XK_Num_Lock); @@ -57,7 +59,7 @@ static void grab_keys(Display *display) { Window root_window = DefaultRootWindow(display); unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask }; for(int i = 0; i < 4; ++i) { - XGrabKey(display, XKeysymToKeycode(display, toggle_overlay_key), Mod1Mask|modifiers[i], root_window, False, GrabModeAsync, GrabModeAsync); + XGrabKey(display, XKeysymToKeycode(display, toggle_overlay_key), toggle_overlay_modifiers|modifiers[i], root_window, False, GrabModeAsync, GrabModeAsync); } XSync(display, False); -- cgit v1.2.3