Re: Problems with gnome window hints



raster@redhat.com writes:
 > On 26 Nov, Tom Tromey scribbled:
 > ->  >>>>> "Manish" == Manish Vachharajani <mvachhar@vger.rutgers.edu> writes:
 > ->  Manish> Here is the problem.  If the panel starts first, it checks to
 > ->  Manish> see if a gnome compliant wm exists, which doesn't, since E
 > ->  Manish> hasn't had time to start up yet, and so it does not set the
 > ->  Manish> gnome window hints for the layer, state, etc.
 > ->  
 > ->  Manish> How would I work around this problem?  Is there any way to
 > ->  Manish> force the session manager to start clients in a specific
 > ->  Manish> order?
 > ->  

[clip]

 > ->  
 > ->  2. If #1 isn't feasible, add a way for clients to detect when a winning
 > ->     wm starts up.  Then change the clients to detect this situation
 > ->     and modify their behavior accordingly.  This scenario avoids the
 > ->     problem because it doesn't matter if the panel wins the race -- it
 > ->     will change its behavior once it sees that E starts up.
 > 
 > to detect a WM appearing or dissapearing the app has to:
 > 1. select on propertychangenotfy's on the root window. If there is
 > currently no gnome WM there then wait till the _WIN_SUPPORTING_WM_CHECK
 > changes - when it does perform a chekc for the WM chekc window it
 > poitns to.. if thats there - select on it for destroys
 > (structurenotify) then sit around - whenevr that window is destroyed
 > the WM went away - set status of WM to 0 and re-initialise all toplevel
 > windows (or modify them for a  workaround when no WM is around) o bakc
 > to non WM there state and wait for a property change/.. if the WM
 > starts up re-init the windows (or modify then unmap and remap them) to
 > work... it's not pretty.

There is an alternative available based on using the session
manager. X11R6 session management requires that clients set up their
properties correctly for the current window manager while processing 
Save Yourself (i.e. in their "save_yourself" signal handlers). 
Otherwise, the WM may not find the properties that it requires to 
save the state correctly during Save Yourself Phase 2 processing.

Providing the window manager starts before the clients this is all
that needs to be done to get things working since the session manager
will always pass a Save Yourself to each client immediately after
it has registered the connection and this will initialise the 
properties.

All that needs to be done to cover the case when the WM starts after
the clients is for the WM to set the properties that identify its
existance to the clients onto the root window and then issue a 
SmcRequestSaveYourself with global=TRUE to the session manager. 
This will get them all to register their properties and away you go.

This is very slightly losing in that some clients may be asked to 
process one more save yourself than is strictly necessary but what
the hell... (:

Felix



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