Package: xaos
Version: 3.2-7
Severity: normal
Tags: patch

(I submitted this patch upstream also, but it would be nice to get in 
Debian soon)

xaos has a -windowid option, but for instance xscreensaver uses a 
-window-id option for all hacks. The patch adds a -window-id option 
alongside the old -windowid one, so that it can work as a screensaver as 
well.

It also makes sure -windowid takes precedence if combined with -root or 
-fullscreen. This makes previewing of the screensaver possible.
diff --git a/src/ui/ui-drv/x11/ui_x11.c b/src/ui/ui-drv/x11/ui_x11.c
index 3a8e94a..040da45 100644
--- a/src/ui/ui-drv/x11/ui_x11.c
+++ b/src/ui/ui-drv/x11/ui_x11.c
@@ -400,6 +400,8 @@ x11_copy ()
 static int
 x11_init (void)
 {
+  if (xparams.windowid != -1)
+    xparams.rootwindow = xparams.fullscreen = 0;
   if (xparams.fullscreen || xparams.rootwindow)
     sharedcolormap = 1;		/*private colormap is broken in fullscreen
 				   mode (at least at my X) */
@@ -598,6 +600,7 @@ static CONST struct params params[] = {
   {"-nomitshm", P_SWITCH, &xparams.nomitshm, "Disable MITSHM extension."},
   {"-fullscreen", P_SWITCH, &xparams.fullscreen, "Enable fullscreen mode."},
   {"-windowid", P_NUMBER, &xparams.windowid, "Use selected window."},
+  {"-window-id", P_NUMBER, &xparams.windowid, "Use selected window."},
   {"-root", P_SWITCH, &xparams.rootwindow, "Use root window."},
   {NULL, 0, NULL, NULL}
 };

Reply via email to