Oh, sorry, XFlush should be replaced by _XFlush. On 2019/11/27 上午11:47, Chen Gang wrote: > 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. > > 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 c4c62be..59ed03a 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 20ad9aa..4b0ffca 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; >
_______________________________________________ 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