-
Notifications
You must be signed in to change notification settings - Fork 341
xwm: add support for xwayland minimize #2337
Conversation
Looking at #2264 the minimize event should be necessary for any compositor which actually supports minimization (for example Wayfire). |
I have tested and wayfire can work with or without the second patch, it's just an extra LOC or two in wayfire with it. I tested minimizing from xwayland csd client as well as minimize from the panel window list. If I understand correctly, the event is present regardless but with the second patch, there is an associated event struct, which doesn't seem to be necessary. |
The event struct is necessary to differentiate between client minimizing and restoring itself. While usually you don't interact with a minimized view (so it won't restore itself), maybe this would be necessary for applications which can be activated via dbus or something? |
xwayland/xwm.c
Outdated
xsurface->saved_height = xsurface->height; | ||
} | ||
|
||
struct wlr_xwayland_minimize_event minimize_event; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use an initializer here to avoid future fields from being undefined?
struct wlr_xwayland_minimize_event event = {
.surface = xsurface,
…
};
xwayland/xwm.c
Outdated
return; | ||
} | ||
|
||
struct wlr_xwayland_minimize_event minimize_event; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from this minor comment, LGTM
19b2e69
to
7b54ac2
Compare
7b54ac2
to
f1609e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Since #2336 was the wrong approach,
I adopted the work from #2264 and I hope I didn't
miss any of the open issues on it.
I'm also not quite sure if the minimize event is necessary, so I left it in a separate commit for now.
A patch for sway that simply rejects minimize requests can be found here junglerobba/sway@9a5d842 (caution, because it causes heavy flickering on wine games that were
previously acting as described here swaywm/sway#4324 )