summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.com>2022-06-06 13:34:12 -0500
committerDerek Foreman <derek.foreman@collabora.com>2022-06-20 16:57:48 +0000
commit8763f3800e1d6ec6cf696eb6c6274424b60935ab (patch)
tree57b092a701ecb79c0f741544dca8db8590cc3311 /xwayland
parent93b58c56486ea623d6146113463b01b5ea07f41e (diff)
downloadweston-8763f3800e1d6ec6cf696eb6c6274424b60935ab.tar.gz
xwayland: Update net_wm state when we change it.
According to the wm-spec we must keep the _NET_WM_STATE property updated to reflect the current state of the window. This has been biting me when firefox starts maximized, then I click the maximize button to toggle to unmaximized state. The next time I mouse over the maximize button (which causes the frame to be re-rendered with the maximized button in a highlighted state) we re-read the window state and weston then believes the window is maximized even though it is being rendered in a not-maximized state. Update the state when we change maximized status so this doesn't happen. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/window-manager.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 41dddd23..dc5f8f9e 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -2176,6 +2176,7 @@ weston_wm_handle_button(struct weston_wm *wm, xcb_generic_event_t *event)
if (frame_status(window->frame) & FRAME_STATUS_MAXIMIZE) {
window->maximized_horz = !window->maximized_horz;
window->maximized_vert = !window->maximized_vert;
+ weston_wm_window_set_net_wm_state(window);
if (weston_wm_window_is_maximized(window)) {
window->saved_width = window->width;
window->saved_height = window->height;