summaryrefslogtreecommitdiff
path: root/src/wayland/meta-xwayland.c
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2021-05-04 14:24:03 +0200
committerMarge Bot <marge-bot@gnome.org>2021-05-11 15:49:25 +0000
commitb03ccfff4d958ed1e752d9937ed2f51ab03edc16 (patch)
treef2697c14164bd27820151ed8a19d462ec462a1d3 /src/wayland/meta-xwayland.c
parente4236530170b6c06b3c3832631f79f33f51703a9 (diff)
downloadmutter-b03ccfff4d958ed1e752d9937ed2f51ab03edc16.tar.gz
xwayland: Check the condition on displayfd ready
The callback on_displayfd_ready() would unconditionally set the return value to TRUE, regardless of the condition. Use the GIO condition to determine if there was data written and adjust the return value accordingly. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1851>
Diffstat (limited to 'src/wayland/meta-xwayland.c')
-rw-r--r--src/wayland/meta-xwayland.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 0d3468d57..c5a9303df 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -898,7 +898,7 @@ on_displayfd_ready (int fd,
* socket when it's ready. We don't care about the data
* in the socket, just that it wrote something, since
* that means it's ready. */
- g_task_return_boolean (task, TRUE);
+ g_task_return_boolean (task, !!(condition & G_IO_IN));
g_object_unref (task);
return G_SOURCE_REMOVE;