Comment 32 for bug 978333

Revision history for this message
In , Chris Bainbridge (chris-bainbridge) wrote :

Created attachment 4565
xfce4-session-4.8.3-fix-logout-fail-with-multiple-interacts.patch

This patch should fix the issue. In my case, this is probably also the cause of bug #8070 (XFWM4 issues at startup).

Basically there are two issues in xfce4-session:
1) With >1 interacting clients, the already interacting client gets moved from state XFSM_CLIENT_INTERACTING -> XFSM_CLIENT_WAITFORINTERACT. This looks like a typo to me, I think the author meant to set the new client to state XFSM_CLIENT_WAITFORINTERACT instead.
2) The 60 second timer is not cancelled even though the client responded in time, so even though the client is waiting in state XFSM_CLIENT_WAITFORINTERACT, it gets timed out and disconnected.

Why does this remove xfwm4 from the session?

xfwm4 always seems to request interaction. If a second client requests interaction, xfwm4 gets moved out of state XFSM_CLIENT_INTERACTING. It then sends interact done and so xfce4-session kills it!

[1342903947] Client Id = 24469b94c-4060-4fb1-aafe-b747eefc7547, send INTERACT DONE, but client is not in INTERACTING state
   Client will be disconnected now.

Bang, no more xfwm4 in the session, the session gets saved, and on next login it doesn't get run.

(Really, this should also be fixed so that xfwm4 always gets started regardless of whether or not it's in the session - a crash of xfwm4 shouldn't cause the user to lose the window manager forever, most users will not know how to switch to a console and restart xfwm4 manually)