summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2024-01-25 09:04:14 +0100
committerLeonardo Hernández Hernández <leohdz172@proton.me>2024-01-25 19:47:34 -0600
commit863634a61cd953ea82d5fd1e4fa4d04e8b48a23f (patch)
treef24e887ba32fb0e97f1eeae262a7c23bf27ad220
parentac6074f4fdb8cc263c877f08e16a5805d3bb22d2 (diff)
configure xwayland surfaces without monitors
For wine clients often configurex11() is called before mapnotify() and therefore c->mon is NULL. configurex11 just returns early in that case, letting these clients stay in the wrong size. For example only the top left part of winecfg and wine uninstaller is drawn, or confirmation dialogs like when closing wine notepad are too big. Fix this by configuring their surfaces like before 88d386b.
-rw-r--r--dwl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index 76ed8aa..c8283b7 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2844,8 +2844,12 @@ configurex11(struct wl_listener *listener, void *data)
{
Client *c = wl_container_of(listener, c, configure);
struct wlr_xwayland_surface_configure_event *event = data;
- if (!c->mon)
+ /* TODO: figure out if there is another way to do this */
+ if (!c->mon) {
+ wlr_xwayland_surface_configure(c->surface.xwayland,
+ event->x, event->y, event->width, event->height);
return;
+ }
if (c->isfloating || client_is_unmanaged(c))
resize(c, (struct wlr_box){.x = event->x, .y = event->y,
.width = event->width, .height = event->height}, 0);