From cfc03345152192483748f3c45922db293884e288 Mon Sep 17 00:00:00 2001 From: Akshat Deshpande Date: Mon, 1 Aug 2022 19:54:02 -0500 Subject: [PATCH] the final commit I still have to add not crashing when there are no windows left (although it seems that only happens sometimes) I also have to add a few just-in-cases like completely discarding mod2 in the ModMask (a very difficult thing to do), as well as moving some functions around and commenting, but in most cases, xcrab should work! --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5b931ba..42be323 100644 --- a/src/main.rs +++ b/src/main.rs @@ -171,6 +171,8 @@ async fn main() -> Result<()> { } } + mask.set_Two(true); + conn.exchange_request_async(GrabKeyRequest { req_type: 33, owner_events: false, @@ -254,7 +256,7 @@ async fn process_event( if let Some(k) = keyboard_state.process_keycode(ev.detail, ev.state) { if let Some(c) = k.as_char() { for (&bind, action) in &CONFIG.binds { - if bind.key == c && bind.mods.inner == 20 { + if bind.key == c { action.eval(manager, conn).await?; } }