# HG changeset patch # User reimar # Date 1199708523 0 # Node ID ca8190e97ac340614a7d1b978bf43d86c081a556 # Parent dc64735e739188581e7cb77c2e5e785a29a5ab11 Remove some now unused screensaver stuff code. diff -r dc64735e7391 -r ca8190e97ac3 libvo/x11_common.c --- a/libvo/x11_common.c Mon Jan 07 12:18:27 2008 +0000 +++ b/libvo/x11_common.c Mon Jan 07 12:22:03 2008 +0000 @@ -75,8 +75,6 @@ int stop_xscreensaver = 0; static int dpms_disabled = 0; -static int timeout_save = 0; -static int kdescreensaver_was_running = 0; char *mDisplayName = NULL; Display *mDisplay = NULL; @@ -1594,69 +1592,6 @@ * XScreensaver stuff */ -static int got_badwindow; -static XErrorHandler old_handler; - -static int badwindow_handler(Display * dpy, XErrorEvent * error) -{ - if (error->error_code != BadWindow) - return (*old_handler) (dpy, error); - - got_badwindow = True; - return 0; -} - -static Window find_xscreensaver_window(Display * dpy) -{ - int i; - Window root = RootWindowOfScreen(DefaultScreenOfDisplay(dpy)); - Window root2, parent, *kids; - Window retval = 0; - Atom xs_version; - unsigned int nkids = 0; - - xs_version = XInternAtom(dpy, "_SCREENSAVER_VERSION", True); - - if (!(xs_version != None && - XQueryTree(dpy, root, &root2, &parent, &kids, &nkids) && - kids && nkids)) - return 0; - - old_handler = XSetErrorHandler(badwindow_handler); - - for (i = 0; i < nkids; i++) - { - Atom type; - int format; - unsigned long nitems, bytesafter; - char *v; - int status; - - got_badwindow = False; - status = - XGetWindowProperty(dpy, kids[i], xs_version, 0, 200, False, - XA_STRING, &type, &format, &nitems, - &bytesafter, (unsigned char **) &v); - XSync(dpy, False); - if (got_badwindow) - status = BadWindow; - - if (status == Success && type != None) - { - retval = kids[i]; - break; - } - } - XFree(kids); - XSetErrorHandler(old_handler); - - return retval; -} - -static Window xs_windowid = 0; -static Atom deactivate; -static Atom screensaver; - static int screensaver_off; static unsigned int time_last;