From 19ecee9c29526f2f334d6f1f2bb294920625856b Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Sat, 27 Jan 2024 20:14:21 +0000 Subject: [PATCH] WIP fix for i3 terminals sending mouse press before focus event I don't expect this is the correct place for this fix but the thinking is that the window only gets the mouse press event if the mouse is over the terminal window. In this case it makes sense (to me?) that if the window doesn't have focus, the click should still be passed to the application. --- wezterm-gui/src/termwindow/mouseevent.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wezterm-gui/src/termwindow/mouseevent.rs b/wezterm-gui/src/termwindow/mouseevent.rs index 65289d448..bd5c8fcfc 100644 --- a/wezterm-gui/src/termwindow/mouseevent.rs +++ b/wezterm-gui/src/termwindow/mouseevent.rs @@ -755,7 +755,7 @@ impl super::TermWindow { } let allow_action = if self.is_click_to_focus_window || !is_focused { - matches!(&event.kind, WMEK::VertWheel(_) | WMEK::HorzWheel(_)) + matches!(&event.kind, WMEK::VertWheel(_) | WMEK::HorzWheel(_) | WMEK::Press(_)) } else { true };