Public bug reported:
Binary package hint: compiz
When an application makes an X11 QueryTree call on a window created using X11
call CreateWindow and mapped using the X11 call MapWindow, under the compiz
window manager, it's parent turns out to be the root window. For example:
............REQUEST: QueryTree
window: WIN 04e0002b
..............REPLY: QueryTree
root: WIN 0000013b
parent: WIN 0000013b
children: (1)
Under metacity, kwin, twm, mwm, fvwm and other window managers, the parent of
the created/mapped window is some dummy window and the dummy's parent is the
root. For example:
............REQUEST: QueryTree
window: WIN 0440002b <- the window I created
..............REPLY: QueryTree
root: WIN 0000013b
parent: WIN 05000112
children: (1)
............REQUEST: QueryTree
window: WIN 05000112 <- the dummy window
..............REPLY: QueryTree
root: WIN 0000013b
parent: WIN 0000013b
children: (1)
Some (old) X applications rely on the behavior given in metacity et al.
They expect to have to QueryTree two levels up to get to the root
window. However, under compiz, querying 2 levels up brings you to
"parent: None" or "0". An application wanting to know the size of the
root window might execute GetGeometry on window id "0" which throws an X
"ERROR: Drawable" and closes the application.
I am running compiz-fusion under gnome in Hardy, and have confirmed this
behavior using compiz/emerald under Gutsy. In Hardy:
compiz-core: Version: 1:0.7.2-0ubuntu2
nvidia-glx-new: Version: 169.12+2.6.24.11-12.31
architecture: 2.6.24-12-generic #1 SMP Wed Mar 12 22:31:43 UTC 2008 x86_64
GNU/Linux
It has also been confirmed on Feisty.
This bug also exists in the "Native" window manager used by Cygwin/X.
It does not exist in every old-school window manager I've tried.
Using the program "xmon" I have captured the X request/response from a
certain X client (HP/Agilent/Verigy SmarTest, using an ancient HP
graphics toolkit).
Under metacity which works correctly, it looks like:
------ xmon output from program under metacity ---------
............REQUEST: QueryTree
window: WIN 0440002b
..............REPLY: QueryTree
root: WIN 0000013b
parent: WIN 05000112 <-- ****
Dummy window ****
children: (1)
............REQUEST: QueryTree
window: WIN 05000112
..............REPLY: QueryTree
root: WIN 0000013b
parent: WIN 0000013b <---- ****
This is correct behavior ****
children: (1)
............REQUEST: GetGeometry
drawable: DWB 0000013b
..............REPLY: GetGeometry
depth: 18
root: WIN 0000013b
x: 0
y: 0
width: 0cd0
height: 04b0
border-width: 0000
-----------------------------------------
Under compiz which is broken, it looks like:
------ xmon output from program under Compiz ---------
............REQUEST: MapWindow
window: WIN 04e0002b
............REQUEST: QueryTree
window: WIN 04e0002b
..............REPLY: QueryTree
root: WIN 0000013b
parent: WIN 0000013b <--- old
program thinks this is dummy window but it's the root
children: (1)
............REQUEST: QueryTree
window: WIN 0000013b
..............REPLY: QueryTree
root: WIN 0000013b
parent: None <--- ****This is
the problem right here****
children: (170)
............REQUEST: GetGeometry
drawable: DWB 00000000 <----- "None" gets passed into
another request
..............ERROR: Drawable <---- and the
program dies.
---------------------------------------------------------------------
My theory is that the old-school window managers need to create the dummy
window in between the application and the root in order to draw their window
decorations. compiz draws window decorations using GLX magic and bypassing X
altogether. The Cygwin/X native window manager uses Windows for decoration and
so also bypasses this layer. Just creating everything under the root window
makes sense in these cases but it creates an incompatibility with old
tried-and-true programs which are, closed-source, badly maintained and designed
to run under CDE on old HPUX or Solaris.
I think it's important to retain backwards compatibility with these
programs since one of the goals of X-windows is to enable heterogeneous
computing environments where you can run an instrument interface on a 10
-year-old SGI system on the same desktop as the latest beta of firefox.
** Affects: compiz (Ubuntu)
Importance: Undecided
Status: New
--
QueryTree returns parent: None under compiz window manager
https://bugs.launchpad.net/bugs/203929
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs