diff options
-rw-r--r-- | test/present-test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/present-test.c b/test/present-test.c index ec8db6b3..651df4aa 100644 --- a/test/present-test.c +++ b/test/present-test.c @@ -31,6 +31,7 @@ #include <X11/xshmfence.h> #include <X11/Xutil.h> #include <X11/Xlibint.h> +#include <X11/extensions/dpms.h> #include <X11/extensions/randr.h> #include <X11/extensions/Xrandr.h> #include <X11/extensions/Xrender.h> @@ -220,6 +221,7 @@ static void teardown_msc(Display *dpy, void *q) { xcb_unregister_for_special_event(XGetXCBConnection(dpy), q); } + static int test_whole(Display *dpy) { xcb_connection_t *c = XGetXCBConnection(dpy); @@ -1344,6 +1346,7 @@ int main(void) { Display *dpy; Window root; + int dummy; int error = 0; uint64_t last_msc; void *queue; @@ -1355,6 +1358,9 @@ int main(void) if (!has_present(dpy)) return 77; + if (DPMSQueryExtension(dpy, &dummy, &dummy)) + DPMSDisable(dpy); + root = DefaultRootWindow(dpy); signal(SIGALRM, SIG_IGN); @@ -1392,5 +1398,7 @@ int main(void) teardown_msc(dpy, queue); + if (DPMSQueryExtension(dpy, &dummy, &dummy)) + DPMSEnable(dpy); return !!error; } |