2 * Copyright © 2009 Christopher Eby <kreed@kreed.org>
4 * This file is part of Inertia.
6 * Inertia is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Library General Public License as
8 * published by the Free Software Foundation, either version 3 of
9 * the License, or (at your option) any later version.
11 * Inertia is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 * See <http://www.gnu.org/licenses/> for the full license text.
23 #include <X11/extensions/sync.h>
24 #include <X11/extensions/scrnsaver.h>
26 static Display
*dpy
= NULL
;
28 void reset_idle_time()
31 if (!(dpy
= XOpenDisplay(NULL
))) {
32 fputs("Could not open X11 display.\n", stderr
);
37 XScreenSaverSuspend(dpy
, True
);
39 XScreenSaverSuspend(dpy
, False
);