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

commite279f76d7adf805223717068edf9eb615dcf575b
parent304bb2110e
authorIsaac Freund <[email protected]>
date2022-01-02 04:32
Xwayland: move window to top of X11 stack on focus

This is required for X11 input handling to work properly with
overlapping windows.

 deps/zig-wlroots       | 2 +-
 river/XwaylandView.zig | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/deps/zig-wlroots b/deps/zig-wlroots
index 417c103..49a5f81 160000
--- a/deps/zig-wlroots
+++ b/deps/zig-wlroots
@@ -1 +1 @@
-Subproject commit 417c10339e253a978135f48d5573932a340a6992
+Subproject commit 49a5f81a71f7b14a3b0e52a5d5d8aa1a9e893bda
diff --git a/river/XwaylandView.zig b/river/XwaylandView.zig
index 8bc27bf..ff29cf8 100644
--- a/river/XwaylandView.zig
+++ b/river/XwaylandView.zig
@@ -91,6 +91,7 @@ pub fn close(self: Self) void {
 
 pub fn setActivated(self: Self, activated: bool) void {
     self.xwayland_surface.activate(activated);
+    self.xwayland_surface.restack(null, .above);
 }
 
 pub fn setFullscreen(self: Self, fullscreen: bool) void {