diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/src/main.rs b/src/main.rs index a14d81c..b107ae2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -193,7 +193,7 @@ async fn process_event( } Event::ButtonPress(ev) => { dbg!(&ev); - if ev.detail == 1 { + if ev.detail == 1 && manager.has_client(ev.event) { manager.set_focus(conn, ev.event).await?; } } diff --git a/src/x11/client.rs b/src/x11/client.rs index ded53e0..f2afc1c 100644 --- a/src/x11/client.rs +++ b/src/x11/client.rs @@ -874,7 +874,8 @@ async fn frame(conn: &mut Dpy, win: Window) -> Resul | EventMask::KEY_RELEASE | EventMask::ENTER_WINDOW | EventMask::LEAVE_WINDOW, - ); + ) + .await?; may_not_exist(win.change_save_set_async(conn, SetMode::Insert).await)?;