evite can still suck it

"Bird, squiggley line, sideways man, fish."
Tags: , ,

xscreensaver 4.13

XScreenSaver 4.13 out now -- no new savers this time, but now on Xinerama systems, it will run one saver on each monitor (just like in "real" multi-head mode) instead of running one saver stretching across all the screens (which looked like ass.)

Sadly, to make this work, I had to add a kludge to the vroot.h file (which is the mechanism by which client programs find the root window to draw on.)

So this means that all the bundled screen savers will work fine, but any 3rd party screen savers will need to be recompiled with the latest vroot.h, or they will malfunction with Xinerama (they'll draw on the wrong window and compete with whatever is already running there.) For example, Xinerama users will be wanting to download the new version of XDaliClock if they use it with xscreensaver.

Extra super-sekrit bonus hack that works even with single-monitor systems: add the line "quad: true" to your ~/.xscreensaver file.

<LJ-CUT text=" 'What did I change,' I hear you asking... (30%) ">

What did I change? I hear you asking. Well, here's the deal. Back in the caveman days when I wrote xscreensaver, there were a bunch of programs floating around that could draw on the root window. I wanted to use those as screen savers, but didn't want to have to cut-and-paste the code to make that work.

It happened that, with some window managers, these programs had to include this silly vroot.h file in order to work, because those window managers had a "virtual" root window. So, eureka, xscreensaver could just impersonate the root window in the same way the window managers do, and everything would just magically work. Sweet.

Fast forward about ten years. Now it's common for people to have multiple monitors attached to their computers. X has always had a way of doing this; basically each screen is its own desktop. The mouse can move between them, but windows can't, so you have to launch windows on the screen you want them to stay on forever. This is kind of lame, so the popular thing to do is use the "Xinerama" extension, which makes it possible to move windows from one screen to another. In Xinerama mode, there's really only one X "screen", as far as programs can tell, it just happens to be really wide. It's possible to find out which parts of that one screen are covered by glass, but other than that, there's really no way to address each monitor independently. (You might expect that the way Xinerama is implemented is as a proxy on top of the underlying X screens, but it's not: all the monitors actually share one frame buffer.)

This is a problem for xscreensaver, because the way it runs different screen savers on each monitor depends on those programs drawing on the first root window they can find. This works great in normal multi-head mode, because each screen has exactly one virtual root window. In Xinerama-mode, we'd need multiple virtual root windows on the one X screen, and no way to tell the screen savers which one to use (since we want each of them to use different ones.)

So, I hacked vroot.h to first consult the environment variable $XSCREENSAVER_WINDOW, and if that's set, just draw there. This is somewhat evil, since it's the first change to vroot.h since 1991...

If I were starting over from scratch today, I'd just demand that all programs to be used as screen savers take a --window-id command-line option instead of doing this fake root window nonsense, but with the weight of history and the vast installed base, I think that the vroot.h change is probably the least hassle.

Also, this way the change only affects multi-screen Xinerama users, instead of affecting everybody.

Tags: , , ,
Current Music: Cubanate -- 9:59 ♬

The Wayback Machine has a search engine now

web.archive.org is pretty neat: not only does it show you hits from the historical pages in the archive, but it also shows you a graph of the popularity of your search terms over time.

Observe the fading star known as "jwz":

Tags: , ,