From 0ce52bc9ed32d7b6d1a588e5c0813fa1327bc690 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Wed, 27 Dec 2023 23:08:57 +0100 Subject: Remove support for xprint xprint is deprecated and was removed from xorg in 2008. Signed-off-by: Tim Wiederhake --- src/twm.c | 62 -------------------------------------------------------------- 1 file changed, 62 deletions(-) diff --git a/src/twm.c b/src/twm.c index 252bdf7..045622b 100644 --- a/src/twm.c +++ b/src/twm.c @@ -84,10 +84,6 @@ in this Software without prior written authorization from The Open Group. #include #include -#ifdef XPRINT -#include -#endif /* XPRINT */ - #ifdef HAVE_XRANDR #include #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); -- cgit v1.2.3