diff options
author | Keith Packard <keithp@keithp.com> | 2013-07-26 18:46:45 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2020-03-29 13:47:09 -0700 |
commit | 3f2af30bd94ea3012bc1d1bde82f7c9a1c4dea27 (patch) | |
tree | 7373ec89b489d2edfe0c8c1a329cac12c932ea1e /xeyes.c | |
parent | 46dac260d384e034aaabd576d9b818d39f4821c6 (diff) |
Add support for the 'Present' extension. [v3]
This makes updating the eyes nicely vblank synchronized.
v2:
Ensure extensions exist before calling query_version
These calls add calls to xcb_get_extension_data before calling
query_version calls, as those calls will mark the connection
with an error if made against an X server without the
extension present.
Suggested-by: Uli Schlachter <psychon@znc.in>
v3:
check the 'present' field in the return from
xcb_get_extension_data; the xcb_get_extension_data call will
always succeed (save for out of memory), the only way to tell
if the extension is supported in the target X server is to
test the 'present' field in the query extension reply value.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'xeyes.c')
-rw-r--r-- | xeyes.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -57,6 +57,10 @@ usage(void) fprintf(stderr, " [-render | +render]\n"); #endif +#ifdef PRESENT + fprintf(stderr, + " [-present | +present]\n"); +#endif exit(1); } @@ -73,6 +77,10 @@ static XrmOptionDescRec options[] = { {"-render", "*eyes.render", XrmoptionNoArg, "TRUE"}, {"+render", "*eyes.render", XrmoptionNoArg, "FALSE"}, #endif +#ifdef PRESENT +{"-present", "*eyes.present", XrmoptionNoArg, "TRUE"}, +{"+present", "*eyes.present", XrmoptionNoArg, "FALSE"}, +#endif {"-distance", "*eyes.distance", XrmoptionNoArg, "TRUE"}, }; |