[PATCH] libx11-1.6.7: Flush buffer in time for global (un)lock xserver operation
walter harms
wharms at bfs.de
Wed Nov 27 17:48:52 UTC 2019
Am 27.11.2019 04:52, schrieb Chen Gang:
> Oh, sorry, XFlush should be replaced by _XFlush.
>
it looks reasonable,
NTL can you provide an example works.c vs. not_works.c ?
re,
wh
> 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 <chengang at 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 at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list