From e447e1b41fbb4fa210e0a2cf8ecb1e3ac932ab32 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Wed, 20 Oct 2021 15:40:50 +0200 Subject: [PATCH] Xwayland: always send configure if requested This seems to fix an issue with mouse input for steam if steam is not started on an output at 0,0. X11 is pretty spooky. --- river/XwaylandView.zig | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/river/XwaylandView.zig b/river/XwaylandView.zig index 03b8787..aac9af6 100644 --- a/river/XwaylandView.zig +++ b/river/XwaylandView.zig @@ -226,13 +226,18 @@ fn handleRequestConfigure( ) void { const self = @fieldParentPtr(Self, "request_configure", listener); - // Allow xwayland views to set their own dimensions (but not position) - // if floating or unmapped - if (self.view.surface == null or self.view.pending.float) { + // If unmapped, let the client do whatever it wants + if (self.view.surface == null) { + self.xwayland_surface.configure(event.x, event.y, event.width, event.height); + return; + } + + // Allow xwayland views to set their own dimensions (but not position) if floating + if (self.view.pending.float) { self.view.pending.box.width = event.width; self.view.pending.box.height = event.height; - self.configure(); } + self.configure(); } fn handleCommit(listener: *wl.Listener(*wlr.Surface), surface: *wlr.Surface) void {