Add key events to the window event mask

This commit is contained in:
Michael Zhang 2020-12-24 12:47:00 -06:00
parent 3af06e9665
commit 8555dc0c37
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B

View file

@ -70,7 +70,10 @@ impl Gui {
screen.root_visual(), screen.root_visual(),
&[ &[
(xcb::CW_OVERRIDE_REDIRECT, 1), (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), (xcb::CW_CURSOR, cursor),
], ],
) )