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>
This commit is contained in:
parent
e423653017
commit
b03ccfff4d
@ -898,7 +898,7 @@ on_displayfd_ready (int fd,
|
|||||||
* socket when it's ready. We don't care about the data
|
* socket when it's ready. We don't care about the data
|
||||||
* in the socket, just that it wrote something, since
|
* in the socket, just that it wrote something, since
|
||||||
* that means it's ready. */
|
* that means it's ready. */
|
||||||
g_task_return_boolean (task, TRUE);
|
g_task_return_boolean (task, !!(condition & G_IO_IN));
|
||||||
g_object_unref (task);
|
g_object_unref (task);
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user