aob@lanl.gov (Alexander O. Brown) (08/02/90)
If I understand it right, a window manager will create a new window like the orignal window with decorations and with the root as the parent, and then reparent the original window so that its new parent is the new window with decorations. In a program I am doing, I am selecting a window with the mouse and it is giving me the window generated by the window manager (the one with decoartions). How can I get the original window when I have this new decoarted window? Does the function XmuClientWindow achieve this (I am currently working with release 3, so I cannot tell if it will work)? Any help would be appreciated. Alex Brown aob@beta.lanl.gov
mikey@eukanuba.wpd.sgi.com (Mike Yang) (08/03/90)
In article <58817@lanl.gov>, aob@lanl.gov (Alexander O. Brown) writes: |> In a program I am doing, I am selecting a window with the mouse and |> it is giving me the window generated by the window manager (the |> one with decoartions). How can I get the original window |> when I have this new decoarted window? Does the function |> XmuClientWindow achieve this (I am currently working |> with release 3, so I cannot tell if it will work)? Yes, XmuClientWindow will return the window you want if you're running an ICCCM-compliant window manager (e.g. mwm, R4 twm). Some window managers which aren't really ICCCM-compliant will also work if they set the WM_STATE property on the client window (e.g. hpwm, dxwm). It shouldn't matter that you're running R3, unless XmuClientWindow isn't available in R3. ----------------------------------------------------------------------- Mike Yang Silicon Graphics, Inc. mikey@sgi.com 415/335-1786
keith@hpcvlx.cv.hp.com (Keith Taylor) (08/03/90)
>/ hpcvlx:comp.windows.x / aob@lanl.gov (Alexander O. Brown) / 10:14 am Aug 1, 1990 / >If I understand it right, a window manager will create a new >window like the orignal window with decorations and with the root >as the parent, and then reparent the original window so that >its new parent is the new window with decorations. > >In a program I am doing, I am selecting a window with the mouse and >it is giving me the window generated by the window manager (the >one with decoartions). How can I get the original window >when I have this new decoarted window? Does the function >XmuClientWindow achieve this (I am currently working >with release 3, so I cannot tell if it will work)? > >Any help would be appreciated. > > Alex Brown > aob@beta.lanl.gov >---------- What you need to do is look through the children of the window you get until you find the window with the WM_STATE property. This is the original client. The window manager (at least an ICCCM compliant one) puts a WM_STATE property on the windows it manages. Keith M. Taylor keith@cv.hp.com Hewlett-Packard Corvallis, Oregon