RE: gnome-libs session-management does not work with xsm?



Robert Bihlmeyer wrote:
 > using xsm as a session-manager, gnome apps (ee, panel, ggv)
 > seem to behave strangely: mouse-clicks are ignored.

I interpret this one as a bug in xsm. 

Under the protocol, clients are supposed to refuse input during a
save unless they are responding to an Interact message from the 
session manager. Gnome enforces this part of the protocol by putting 
a grab on gtk input during the session save. This grab is released 
when the gnome client receives a SaveYourselfDone, a SaveComplete or 
a ShutdownCancelled message.

Unfortunately, xsm sends an initial SaveYourself when a client
registers for the first time and then simply forgets about it.
As a result, it does not reply to the SaveYourselfDone from the 
gnome client with a SaveComplete and the gnome client is left 
hanging in the grab.

I could patch up the gnome-libs to accomodate this xsm bug, BUT, 
does anyone think that this is the Right Thing (TM) to do ?

gnome-session does not send the initial SaveYourself. However,
it is needed by non-gnome clients before they will set their 
session manager properties. Therefore, unless someone gets back to 
me, I will patch gnome-session to send the initial SaveYourself 
without the xsm bug.

Gnome apps can ignore the initial SaveYourself by returning 
immediately from their "save_yourself" handler using: 
g_return_if_fail (!fast);

Robbe also reported another problem with xsm / gnome (is he the only
dude using these together ?):
 > all gnome apps I have tried while running xsm crash the session
 > manager. This is because xsm does not grok LISTofARRAY8 properties
 > with a length of 0. For the sake of backward compatibility, gnome code
 > should refrain from generating such properties, at least for the time
 > being.

Fixed in CVS.

 > The problematic property seems to be SmEnvironment that is usually
 > empty for me. This fact seems to be a problem in itself: if I read the 
 > specs correctly, SmEnvironment should contain the process environment
 > (all environment variables).

The SmEnvironment only needs to include the enviroment variables
which actually influence how the app will run when restarted. Setting
all of them would be inefficient and would create problems because
some environment variables (like $SESSION_MANAGER) have to change
between one session and the next. Accordingly, the current gnome
practice, which leaves it up to the app programmer to specifiy
which environment variables are needed (if any) seems like the Right
Thing (TM) to me. (:

Felix



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