How does X Server assign Window ID?

Peter Hutterer peter.hutterer at who-t.net
Wed Mar 4 14:42:25 PST 2009


On Wed, Mar 04, 2009 at 04:57:17PM -0500, Sheng Yu wrote:
> Hi all,
> 
> I have been tracking for a bug that makes my program crashing when
> calling function glXMakeCurrent.
> My program runs with multi-displays, ':0.0', ':1.0', ':1.1', ':2.0',
> ':2.1'. When glXMakeCurrent() is called
> to switch rendering context from ':0.0' to either ':1.0', ':1.1' or
> ':2.0', ':2.1', the program runs fine.
> However, if the rendering context is switch from ':1.1' to ':2.0',
> the program crashes with with a
> segmentation fault.
> 
> The interesting thing  I found when debugging is the window ID and
> root window ID for each display:
> display:':0.0',screen: 0, root window id: 315, window id: 71303171
> display:':1.0',screen: 0, root window id: 595, window id: 2097156
> display:':1.1',screen: 1, root window id: 597, window id: 4194308
> display:':2.0',screen: 0, root window id: 595, window id: 2097156
> display:':2.1',screen: 1, root window id: 597, window id: 4194308
> 
> It seems that X Server 1 and 2 assign window ID with the same
> strategy, which is different from X Server 0.
> I am wondering whether it is causing the crashing, which indicates
> problems in X Server settings. I have
> been digging into the source of X Server and I cannot find how the
> window ID is assigned. Could someone
> tell me which file I should look into? Thanks a lot!

CreateRootWindow() in dix/window.c, through a call to FakeClientID().
 
Cheers,
 Peter



More information about the xorg mailing list