[mutter/wip/carlosg/help-cleanup-gtk-usage: 2/2] backends/x11: Flush connection after ungrab
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/help-cleanup-gtk-usage: 2/2] backends/x11: Flush connection after ungrab
- Date: Fri, 30 Nov 2018 02:32:40 +0000 (UTC)
commit 45fea572846e86a06367bc0f31fc482206339e43
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Nov 26 14:32:01 2018 +0100
backends/x11: Flush connection after ungrab
Modal ungrabs may be followed by other clients trying to grab themselves,
flush the connection so we ensure the right order of events on the Xserver
side.
An example of this is js/ui/modalDialog.js in gnome-shell, as the alt-F2
dialog may launch X11 clients trying to grab themselves, commit a40daa3c22
in gnome-shell handled the case and added a gdk_display_sync() call to
ensure no grab existed at the time of executing.
This commit aims to achieve the same built in MetaBackend. A full sync
seems excessive though, as we just need to make sure the server got the
messages queued before the other side tries to grab, a XFlush seems
sufficient for this.
src/backends/x11/meta-backend-x11.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c
index 99cc6180c..c1c976986 100644
--- a/src/backends/x11/meta-backend-x11.c
+++ b/src/backends/x11/meta-backend-x11.c
@@ -577,6 +577,7 @@ meta_backend_x11_ungrab_device (MetaBackend *backend,
int ret;
ret = XIUngrabDevice (priv->xdisplay, device_id, timestamp);
+ XFlush (priv->xdisplay);
return (ret == Success);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]