What happens when logging out to the applications?
Benedikt Meurer
benedikt.meurer at unix-ag.uni-siegen.de
Thu Jul 6 15:09:39 CEST 2006
Enrico Tröger wrote:
> Hi,
>
> I'm a bit confused.
> Until now, I thought when I'm logging out and my session is saved, all
> running applications get signal 15(SIGTERM) and therefore quit.
Nope, the Xserver simply closes the connection and the XIOErrorHandler
is invoked (the GDK registered one simply terminates the application).
> But it seems, that this is not the case. I had a look in
> xfce4-session's code and if I read it correctly it calls SmsSaveYourself
> (). And I guess, this function sends a kind of signal or message to
> each application to ask it to quit.
>
> How can I react on this signal in my (GTK-)application?
Connect to the session manager (using libSM/libICE) and register the
"save_yourself" (session manager invokes this to tell the application to
save its state) and "die" (session manager invokes this to tell the
application to terminate) handlers.
> Regards,
> Enrico
Benedikt
More information about the Xfce4-dev
mailing list