From: Chen Gang <cheng...@emindsoft.com.cn> The global (un)lock xserver operations will have effect to the whole system, and all the other gui apps have to be blocked, so the operations should not be buffered, or may cause sync issue, e.g. reboot machine.
Cc: Lv Li-song <lvlis...@emindsoft.com.cn> Signed-off-by: Chen Gang <cheng...@emindsoft.com.cn> --- src/GrServer.c | 1 + src/UngrabSvr.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/GrServer.c b/src/GrServer.c index c4c62bef..8f81157c 100644 --- a/src/GrServer.c +++ b/src/GrServer.c @@ -35,6 +35,7 @@ XGrabServer (register Display *dpy) _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq(GrabServer, req); + _XFlush(dpy); /* For Global (un)lock ops must be sent quickly */ UnlockDisplay(dpy); SyncHandle(); return 1; diff --git a/src/UngrabSvr.c b/src/UngrabSvr.c index 20ad9aa3..49c8b9af 100644 --- a/src/UngrabSvr.c +++ b/src/UngrabSvr.c @@ -37,6 +37,7 @@ XUngrabServer ( LockDisplay(dpy); GetEmptyReq(UngrabServer, req); + _XFlush(dpy); /* For Global (un)lock ops must be sent quickly */ UnlockDisplay(dpy); SyncHandle(); return 1; -- 2.20.1 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel