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.
This commit is contained in:
Isaac Freund 2021-10-20 15:40:50 +02:00
parent c84fd1a936
commit e447e1b41f
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11

View file

@ -226,13 +226,18 @@ fn handleRequestConfigure(
) void { ) void {
const self = @fieldParentPtr(Self, "request_configure", listener); const self = @fieldParentPtr(Self, "request_configure", listener);
// Allow xwayland views to set their own dimensions (but not position) // If unmapped, let the client do whatever it wants
// if floating or unmapped if (self.view.surface == null) {
if (self.view.surface == null or self.view.pending.float) { 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.width = event.width;
self.view.pending.box.height = event.height; self.view.pending.box.height = event.height;
self.configure();
} }
self.configure();
} }
fn handleCommit(listener: *wl.Listener(*wlr.Surface), surface: *wlr.Surface) void { fn handleCommit(listener: *wl.Listener(*wlr.Surface), surface: *wlr.Surface) void {