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. Actually Xserver may divide XID to these two parts in any bit position. When an application setups a connection Xserver in the reply sends resource-id-mask where ones mark the part of XID that the application may use for resource IDs and zeros mark the common 'connection number' part. Xlib saves this mask in the Display structure. In XFree86's implementation of Xlib it is dpy->resource_mask. In my box its value is 0x1f (more than two bytes). Also the X11 protocol specification says that three most significant bits (of whole XID) can't be used. Unfortunately, the Display structure is opaque for an application and can vary in dependence on Xlib implementation vendor. And there is no standard Xlib call that return this mask. -- Ivan U. Pascal | e-mail: [EMAIL PROTECTED] Administrator of | Tomsk State University University Network | Tomsk, Russia ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: finding all windows belonging to an application
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
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
Re: finding all windows belonging to an application
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 > ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: finding all windows belonging to an application
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. Are there any clues in the xlsclients code ? ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
finding all windows belonging to an application
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