tag 482385 + patch
thanks
Hi Jamie!
You wrote:
> Ideally, someone who has a Linux laptop and a couple of external
> monitors to experiment with would figure out what's wrong, and send me a
> patch...
The following patch should fix it. It seems that xscreensaver simply
called abort() if the number of screen drops to zero (and thus
XineramaQueryScreens() returns NULL). The fix is simple: just not call
abort; when xrandr add a screen again, everything will resume to work
fine.
I tested this on my laptop, and it look ok.
diff -Nur xscreensaver-5.05/driver/windows.c
xscreensaver-5.05.new/driver/windows.c
--- xscreensaver-5.05/driver/windows.c 2008-01-26 23:03:51.000000000 +0100
+++ xscreensaver-5.05.new/driver/windows.c 2008-06-14 19:02:09.286786247
+0200
@@ -1606,18 +1606,14 @@
XineramaScreenInfo *xsi = XineramaQueryScreens (si->dpy, &nscreens);
if (nscreens != si->nscreens) {
- /* Apparently some Xinerama implementations let you use a hot-key
- to change the number of screens in use! This is, of course,
- documented nowhere. Let's try to do something marginally less
- bad than crashing.
+ /* With xrandr 1.2, it is possibel to change th enumber of screens
+ in use! Let's try to handle this by keeping track of the number of
+ screens actually in use.
*/
- fprintf (stderr, "%s: bad craziness: xinerama screen count changed "
- "from %d to %d!\n", blurb(), si->nscreens, nscreens);
if (nscreens > si->nscreens)
nscreens = si->nscreens;
}
- if (!xsi) abort();
for (i = 0; i < nscreens; i++)
{
saver_screen_info *ssi = &si->screens[i];
@@ -1637,7 +1633,8 @@
ssi->width = xsi[i].width;
ssi->height = xsi[i].height;
}
- XFree (xsi);
+ if (xsi)
+ XFree (xsi);
}
else
# endif /* HAVE_XINERAMA */
--
Kind regards,
Bas Zoetekouw.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]