diff options
-rw-r--r-- | src/twm.c | 62 |
1 files changed, 0 insertions, 62 deletions
@@ -84,10 +84,6 @@ in this Software without prior written authorization from The Open Group. #include <X11/extensions/sync.h> #include <X11/Xlocale.h> -#ifdef XPRINT -#include <X11/extensions/Print.h> -#endif /* XPRINT */ - #ifdef HAVE_XRANDR #include <X11/extensions/Xrandr.h> #endif @@ -180,52 +176,10 @@ static char *atom_names[11] = { "WM_WINDOW_ROLE" }; -#ifdef XPRINT -/* |hasExtension()| and |IsPrintScreen()| have been stolen from - * xc/programs/xdpyinfo/xdpyinfo.c */ -static Bool -hasExtension(Display *dpy2, char *extname) -{ - int num_extensions, i; - char **extensions; - - extensions = XListExtensions(dpy2, &num_extensions); - for (i = 0; i < num_extensions && - (strcmp(extensions[i], extname) != 0); i++); - XFreeExtensionList(extensions); - return i != num_extensions; -} - -static Bool -IsPrintScreen(Screen *s) -{ - Display *dpy2 = XDisplayOfScreen(s); - - /* Check whether this is a screen of a print DDX */ - if (hasExtension(dpy2, XP_PRINTNAME)) { - Screen **pscreens; - int pscrcount; - int i; - - pscreens = XpQueryScreens(dpy2, &pscrcount); - for (i = 0; (i < pscrcount) && pscreens; i++) { - if (s == pscreens[i]) { - return True; - } - } - XFree(pscreens); - } - return False; -} -#endif /* XPRINT */ - static void usage(void) { fprintf(stderr, "usage: %s [-display dpy] [-f file] [-s] [-q] [-v] [-V]" -#ifdef XPRINT - " [-noprint]" -#endif /* XPRINT */ " [-clientId id] [-restore file]\n", ProgramName); exit(EXIT_FAILURE); } @@ -289,13 +243,6 @@ main(int argc, char *argv[]) usage(); MultiScreen = FALSE; continue; -#ifdef XPRINT - case 'n': /* -noprint */ - if (!brief_opt(argv[i], "noprint")) - usage(); - NoPrintscreens = True; - continue; -#endif /* XPRINT */ case 'f': /* -file twmrcfilename */ if (!brief_opt(argv[i], "file")) usage(); @@ -427,15 +374,6 @@ main(int argc, char *argv[]) PreviousScreen = DefaultScreen(dpy); FirstScreen = TRUE; for (scrnum = firstscrn; scrnum <= lastscrn; scrnum++) { -#ifdef XPRINT - /* Ignore print screens to avoid that users accidentally warp on a - * print screen (which are not visible on video displays) */ - if ((!NoPrintscreens) && IsPrintScreen(XScreenOfDisplay(dpy, scrnum))) { - twmWarning("skipping print screen %d", scrnum); - continue; - } -#endif /* XPRINT */ - /* Make sure property priority colors is empty */ XChangeProperty(dpy, RootWindow(dpy, scrnum), _XA_MIT_PRIORITY_COLORS, XA_CARDINAL, 32, PropModeReplace, NULL, 0); |