From 8555dc0c3717079a3140959323f35b47034f38b7 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 24 Dec 2020 12:47:00 -0600 Subject: [PATCH] Add key events to the window event mask --- src/gui.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui.rs b/src/gui.rs index 751c3d5..637a817 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -70,7 +70,10 @@ impl Gui { screen.root_visual(), &[ (xcb::CW_OVERRIDE_REDIRECT, 1), - (xcb::CW_EVENT_MASK, evt_mask), + ( + xcb::CW_EVENT_MASK, + evt_mask | xcb::EVENT_MASK_KEY_PRESS | xcb::EVENT_MASK_KEY_RELEASE, + ), (xcb::CW_CURSOR, cursor), ], )