GLX in Xephyr --or-- is there some other way to catch a desktop in a texture?

Ashi Krishnan black.iris.dancer at
Mon Dec 8 16:08:40 PST 2008

On Mon, Dec 8, 2008 at 4:02 PM, Peter Harris
<peter.harris at> wrote:
> Ashi Krishnan wrote:
>> On Mon, Dec 8, 2008 at 2:20 PM, Peter Harris
>> <peter.harris at> wrote:
>>> Ashi Krishnan wrote:
>>>> This is fine if (1)
>>>> the app creates only one window, and (2) is quite cooperative with
>>>> respect to where it draws that window -- like, say, the xscreensaver
>>>> hacks.
>>> Maybe I'm dense, but I'm not seeing how that's a problem. Since you're
>>> acting as the window manager (you are 'managing' that window), you can
>>> manage all the windows of the application. You can decorate and compose
>>> them however you see fit.
>> But I want to manage all the windows of that application and *only*
>> the windows of that application.
> I'm not sure that's possible without being part of a larger framework
> (such as compiz-fusion) that manages the other windows. To do window
> management effectively, you pretty much need to select
> SubstructureRedirect on the root. Once you've done that, you have to be
> the window manager for the whole screen.

Right, that's fine. Even if I decide not to go with Compiz Fusion, I
don't mind becoming the desktop's compositing manager (our app
requires a specialized installation, so it doesn't, in short, have to
play nice with others. Still, it would obviously be preferable if it

>> And, as far as I'm aware, there's no
>> reliable way of figuring out the pid of the process that owns a given
>> window. Does _NET_WM_PID work reliably enough to be useful?
> _NET_WM_PID can be spoofed just as easily as any other property. Better
> than that, X is network transparent. You can have 30 different
> applications all running with the same PID, even without any _NET_WM_PID
> spoofing.

Well, sure, but there's also WM_CLIENT_MACHINE. A privileged process
(well, privileged enough to touch the X server) actively spoofing
windows will be able to trick us, but I don't much care about that.

> I'm inclined to look at WM_NAME and WM_CLASS (in addition to
> _NET_WM_PID). From there, you can look at TRANSIENT_FOR and/or client
> mask bits of the xid to associate windows with each other.

That's a good idea, too. Thanks!

>> Writing a fusion plugin is a great idea, and I'll look into it, but I
>> don't think it solves that problem.
> I'm not sure if compiz-fusion plugins can apply to single applications
> or not. If not, I'm sure it would still be easier to modify
> compiz-fusion to allow plugins to do so than to start from scratch.

I haven't looked at compiz-fusion's plugin infrastructure, but it
seems like it ought to be possible for a plugin to say, "oh, no, I
don't want to do anything with this window," no?

In any case, this is basically why I would dearly love to see Xephyr
support accelerated GLX--I really don't want to get into the business
of tinkering with window managers.

~ v

More information about the xorg mailing list