[Gambas-user] Re: Window positions

GuruLounge - MailLists maillists at ...1367...
Tue Mar 21 22:09:35 CET 2006


Well, it's just an idea I was poking around with.

I ran my app in X without a window manager and after realizing I could
do this I then threw in a desktop form just for the fun of it.  And I
was thinking it would be nice to manage the windows somehow - X without
a WM is a bit unusable.

But if it's too complicated for the current major release (1.0.14) then
I'll forget it and just run my app on top of iceWM or fluxbox.  It seems
to work okay with those.

Jeff


On Tue, 2006-03-21 at 15:38 -0500, Rob Kudla wrote:
> On Tue March 21 2006 15:18, GuruLounge - MailLists wrote:
> > So there's no way to do this?
> 
> You would either have to use gb.api with Xlib to iterate through 
> the list of X clients and retrieve the _NET_WM_PID property for 
> each, or shell out to some program that does it for you.  I 
> haven't done this myself, just googled for a way to do it.
> 
> Don't forget, one process can have a lot of X window ID's (do 
> "xwininfo -root -tree -int" to see what I mean.)  It's not 
> always safe to assume that the parent window is the main 
> application window.
> 
> Naturally, all this assumes that your Gambas app and the desired 
> window are on the same X display.  Also, not all window managers 
> support _NET_WM_PID.... kwin has had it since KDE 3.1, but I 
> don't know if the more lightweight ones do.
> 
> This is the price of network transparency.... X servers were 
> never meant to know what process ID a window belonged to because 
> X was designed as a "many hosts, many terminals" protocol.
> 
> It's possible you could get the source of xtoolwait and modify it 
> to report back the X window ID as well as the process ID of the 
> tool it starts, but even that is kind of chancy.
> 
> Rob
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
-- 

     .^.
     /V\
    /( )\
    ^^-^^
Linux Advocate





More information about the User mailing list