Bug 89028

Summary: XResetScreenSaver does not working without calling XGetScreenSaver right before.
Product: xorg Reporter: YCH <dontdieych>
Component: Lib/XlibAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Call XResetScreenSaver with or without XGetScreenSaver none

Description YCH 2015-02-08 15:10:54 UTC
Created attachment 113260 [details]
Call XResetScreenSaver with or without XGetScreenSaver

$ gcc -lX11 reset.c
$ xset s 5; ./a.out reset # does not working
$ xset s 5; ./a.out get-reset # working

Arch Linux
libx11 1.6.2-2

Let me know if you need any information.

Thanks.
Comment 1 Alan Coopersmith 2015-02-08 16:59:37 UTC
Since XGetScreenSaver() needs a reply from the X server, it flushes the queue
of requests to the X server.

Since XResetScreenSaver() does not, it just puts its request in the queue and
waits for someone else to flush the queue, such as the  XGetScreenSaver() call
on the next time through your loop.  Try putting a XFlush() right after the
XResetScreenSaver() call (before you sleep) and see if that changes it.
Comment 2 YCH 2015-02-08 17:15:44 UTC
Thanks, I'll checkout.
Comment 3 GitLab Migration User 2018-08-10 20:10:57 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/41.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.