Re: What's the right XID ???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eduardo Silva wrote:

> > The returned ID depends on how each application is implemented.
> 
> IIRC every program running connected to  the X Server has a top level
> window (which can be = to the Window manager container for that
> program) and this address must be the same for all cases... a program
> can have N windows but always exist the root one...

X clients don't have to have any windows. E.g. xwininfo and xlsclients
don't create windows.

If a client has multiple windows, none of them are necessarily any
more significant than any other. There are some conventions that a
client attaches certain properties only to the "main" window, but
there's no way to enforce this.

> >  Probably each one is traversing the windows tree different.
> 
> Here's my point, why the 3 resources returns a different window
> address for the same program... at least 'xrestop' uses libXres to get
> that information...

The value reported by xrestop is the client's resource ID base, which
isn't necessarily an XID.
> 
> >  #: xwininfo -root -tree | less
> >
> >  and search for each id that you listed in the output. This probably
> >  will give you some light.
> 
> That line was very useful, thanks :) ,  but I still wonder why they
> return different values :/

Looking at the source code, xlsclients calls XmuClientWindow() on each
child of the root window, while xwininfo calls XmuClientWindow() on
the window from the ButtonPress event. XmuClientWindow() simply
returns the first descendent with a WM_STATE property.

-- 
Glynn Clements <glynn@xxxxxxxxxxxxxxxxxx>
_______________________________________________
xorg mailing list
xorg@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/xorg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [X Forum]     [Intel Graphics]     [AMD Graphics]     [Nouveau Driver]     [XFree86]     [XFree86 Newbie]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Video for Linux]     [Linux RAID]

  Powered by Linux