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>
29 Display
*display
= NULL
;
31 if (!(display
= XOpenDisplay(NULL
))) {
32 fputs("Could not open X11 display.\n", stderr
);
36 int x_force_screen_saver
;
37 int screen_saver_mode
= ScreenSaverReset
;
38 x_force_screen_saver
= XForceScreenSaver(display
, screen_saver_mode
);
39 return x_force_screen_saver
;