summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Wiederhake <twied@gmx.net>2023-12-27 23:08:57 +0100
committerTim Wiederhake <twied@gmx.net>2024-01-01 12:21:24 +0100
commit0ce52bc9ed32d7b6d1a588e5c0813fa1327bc690 (patch)
tree5defd5f65aa5c90f6d144ddcacbd97a5dd5c2cbf
parentf426fa565397b4df53f3f534d3c2bc7bc5857f59 (diff)
Remove support for xprint
xprint is deprecated and was removed from xorg in 2008. Signed-off-by: Tim Wiederhake <twied@gmx.net>
-rw-r--r--src/twm.c62
1 files changed, 0 insertions, 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 <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);