git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit789a536dcd5fe3afef8e0487ce4f618d0beaf181
parent40ea8e11bc
authorIsaac Freund <[email protected]>
date2021-01-08 22:27
cursor: ensure output focus before focusing layer

 river/Cursor.zig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/river/Cursor.zig b/river/Cursor.zig
index ec470b3..3904dfb 100644
--- a/river/Cursor.zig
+++ b/river/Cursor.zig
@@ -218,6 +218,7 @@ fn handleButton(listener: *wl.Listener(*wlr.Pointer.event.Button), event: *wlr.P
             const wlr_layer_surface = wlr.LayerSurfaceV1.fromWlrSurface(surface);
             if (wlr_layer_surface.current.keyboard_interactive) {
                 const layer_surface = @intToPtr(*LayerSurface, wlr_layer_surface.data);
+                self.seat.focusOutput(layer_surface.output);
                 self.seat.setFocusRaw(.{ .layer = layer_surface });
             }
         }