aboutsummaryrefslogtreecommitdiff
path: root/gpu-screen-recorder-overlay-daemon/main.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-10-19 23:49:22 +0200
committerdec05eba <dec05eba@protonmail.com>2024-10-19 23:49:22 +0200
commit939bf23921cce4b934ecc2a98fa871c7538d0276 (patch)
tree1f0efa707f752ec2e0e31e582df3114c7ecfd701 /gpu-screen-recorder-overlay-daemon/main.c
parent668a83d3b96e027c525ac3cf8bb87991c66168fd (diff)
Add screenshots
Diffstat (limited to 'gpu-screen-recorder-overlay-daemon/main.c')
-rw-r--r--gpu-screen-recorder-overlay-daemon/main.c4
1 files changed, 3 insertions, 1 deletions
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);