summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2019-06-23 20:24:58 +0200
committerJonas Ã…dahl <jadahl@gmail.com>2019-06-24 09:21:49 +0000
commit181c7cab328e33600b2c5c9b3d0f79678aebbdd4 (patch)
treece2f63c7112ef7f5f7c3a50c8690d84a43afef6b
parent740a62044ee8f1ab1d3006c030fedaff97d78698 (diff)
downloadmutter-181c7cab328e33600b2c5c9b3d0f79678aebbdd4.tar.gz
wayland: Use right sign for workspace ID
We get a signed integer (-1 meaning "no workspace specified"), store it in an unsigned integer, check for >= 0 (of course it is!) and set as the window workspace (signed integer, -1 meaning "show on all workspaces"). What could possibly go wrong? https://gitlab.gnome.org/GNOME/mutter/merge_requests/639
-rw-r--r--src/wayland/meta-wayland-gtk-shell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wayland/meta-wayland-gtk-shell.c b/src/wayland/meta-wayland-gtk-shell.c
index cbbe9d5f9..6c6652884 100644
--- a/src/wayland/meta-wayland-gtk-shell.c
+++ b/src/wayland/meta-wayland-gtk-shell.c
@@ -172,7 +172,8 @@ gtk_surface_request_focus (struct wl_client *client,
if (sequence)
{
- uint32_t timestamp, workspace_idx;
+ uint32_t timestamp;
+ int32_t workspace_idx;
workspace_idx = meta_startup_sequence_get_workspace (sequence);
timestamp = meta_startup_sequence_get_timestamp (sequence);