Probably should also keep in mind that a single application (e.g. process)
might appear to an Xserver as multiple Xclients. (I think the most common
case would be a multi-thread QT app).

I've seen this also occur for "modeless" dialogs where an app either forks
or spins a thread to handle the modeless dialog. To the Xserver, it looks
like an entirely new Xclient (new connection, new XID, etc), but the Xclient
process (in a threaded case) is the same pid.

Rob

----- Original Message -----
From: "Grant Wallace" <[EMAIL PROTECTED]>
To: "Mark Vojkovich" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 09, 2004 1:58 PM
Subject: Re: finding all windows belonging to an application


> Yes, I see the pattern you mention in XID. Appears
> that the most significant two bytes identify client
> and the least sig two bytes identify window. This
> should solve my problem. Thanks very much.
>
> Grant.
>
> --- Mark Vojkovich <[EMAIL PROTECTED]> wrote:
>
> >
> >    All the resources allocated by a single client
> > will have the
> > same XID prefix.  Look at the output of "xwininfo
> > -children -root"
> > and you'll see what I mean.   What you probably want
> > to do is search
> > from the root and find the all the top-level windows
> > with your
> > client's prefix.
> >
> >
> > Mark.
> >
> >
> > On Mon, 8 Nov 2004, Grant Wallace wrote:
> >
> > > Hi,
> > >   I'm working on modifications to VNC server to
> > share
> > > individual applications. One thing I'm wondering
> > about
> > > is how do I find all windows which belong to the
> > same
> > > application. For instance I currently am able to
> > share
> > > the application's main window by using xwininfo
> > and
> > > getting the main windows ID number. Then I just
> > > traverse the windows tree searching for that id.
> > > However if the application later opens a dialog
> > box or
> > > a menu window I'd like to detect that while
> > traversing
> > > the windows tree and share it also. I haven't yet
> > > found any field within the window data structure
> > that
> > > identifies which application a window belongs to.
> > > What's the best way to find all these related
> > windows
> > > (related by application rather than window
> > hierarchy)?
> > >
> > > Thanks,
> > > Grant.
> > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Check out the new Yahoo! Front Page.
> > > www.yahoo.com
> > >
> > >
> > > _______________________________________________
> > > Devel mailing list
> > > [EMAIL PROTECTED]
> > > http://XFree86.Org/mailman/listinfo/devel
> > >
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Check out the new Yahoo! Front Page.
> www.yahoo.com
>
>
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel
>

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to