summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Bozhinov <iliyabo@hotmail.com>2017-06-24 17:53:02 +0000
committerDaniel Stone <daniels@collabora.com>2017-12-05 11:21:44 +0000
commitef82bdfdd742eda36ecd66da3aefde91a914731a (patch)
tree2fa539d8eab31a23b5b227ec85cda50d0a79a254
parente1af3d8d9d2243c9a1ec06549c2e283f91ea6487 (diff)
xwm: Handle third data entry in client messages
A single client message can be used to modify two properties at once. That's why when processing such messages we have to check both the second and the third data entry for states that we must handle. Signed-off-by: Ilia Bozhinov <iliyabo@hotmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
-rw-r--r--xwayland/window-manager.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 3e8c4c7c..c4ca0c60 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -1619,13 +1619,15 @@ weston_wm_window_handle_state(struct weston_wm_window *window,
struct weston_wm *wm = window->wm;
const struct weston_desktop_xwayland_interface *xwayland_interface =
wm->server->compositor->xwayland_interface;
- uint32_t action, property;
+ uint32_t action, property1, property2;
int maximized = weston_wm_window_is_maximized(window);
action = client_message->data.data32[0];
- property = client_message->data.data32[1];
+ property1 = client_message->data.data32[1];
+ property2 = client_message->data.data32[2];
- if (property == wm->atom.net_wm_state_fullscreen &&
+ if ((property1 == wm->atom.net_wm_state_fullscreen ||
+ property2 == wm->atom.net_wm_state_fullscreen) &&
update_state(action, &window->fullscreen)) {
weston_wm_window_set_net_wm_state(window);
if (window->fullscreen) {
@@ -1640,10 +1642,12 @@ weston_wm_window_handle_state(struct weston_wm_window *window,
weston_wm_window_set_toplevel(window);
}
} else {
- if (property == wm->atom.net_wm_state_maximized_vert &&
+ if ((property1 == wm->atom.net_wm_state_maximized_vert ||
+ property2 == wm->atom.net_wm_state_maximized_vert) &&
update_state(action, &window->maximized_vert))
weston_wm_window_set_net_wm_state(window);
- if (property == wm->atom.net_wm_state_maximized_horz &&
+ if ((property1 == wm->atom.net_wm_state_maximized_horz ||
+ property2 == wm->atom.net_wm_state_maximized_horz) &&
update_state(action, &window->maximized_horz))
weston_wm_window_set_net_wm_state(window);