Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
fix(input): a Super-held body grab focuses the window it moves
Without hover-to-focus the grabbed window could stay unfocused, so the
frame never moved to it. The press now focuses it, as a normal press
would; overview is unchanged (hover already focused it there).
Co-Authored-By: Claude Fable 5.1 <[email protected]>
src/server/cursor.rs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/server/cursor.rs b/src/server/cursor.rs
index 686b4b9..35f7382 100644
--- a/src/server/cursor.rs
+++ b/src/server/cursor.rs
@@ -1508,6 +1508,12 @@ unsafe extern "C" fn handle_button(listener: *mut ffi::wl_listener, data: *mut s
if overview_chrome || clicked_grid {
// fall through
} else if overview_win_valid && matches!(overview_border_zone, BorderZone::None) {
+ // Super-held at zoom 1: the grab focuses the window, as a
+ // normal press would — the frame moves to it for the drag.
+ // In overview hover already focused it.
+ if !in_overview {
+ seat.focus(Focus::Window(clicked_win));
+ }
(*server).wm.stop_panning_animation();
let cursor_x = (*cursor.wlr_cursor).x;
let cursor_y = (*cursor.wlr_cursor).y;