https://bugs.kde.org/show_bug.cgi?id=346768

--- Comment #56 from Alexey Chernov <[email protected]> ---
I've just applied and quite intensively tested two patches John attached.

At first for patches: I've actually looked through them before applying, and
there're a couple of questions:

1. I've modified kxmlgui patch a little — at first I've replaces close event
stuff for calling queryClose() method. Following XSM protocol one is not
allowed to close windows on the saving state as a) this is not necessary
shutdown that save-yourself is triggered , it is explicitly stated in the
documentation, and b) shutdown, if any, could normally be cancelled and session
would continue, and closing some windows would just spoil this user's session.

Another thing I removed is restore() method which is obviously the same as
before, but always returns false. Is there any reason for it?

2. KSMServer patch is what I first have tried not to apply at all. Except the
first edit, which seems to be right as it's just follows the comment, other
stuff seems to be redundant. Could you please explain you ideas behind these
changes? Anyway, everything works even without it (see below).

As for testing, I've tested the following use cases:

1. Plain saving session. It's generally works even without any patches (except
Qt patch https://codereview.qt-project.org/#/c/140115 I've applied much
earlier). Works fine.

2. Saving session with several "modified" clients — in my case it was KWrite
with unsaved document and Konsole with "vim" running in one of the tabs. On
logging out I was gently and sequencially asked for both KWrite and Konsole.
Saved nothing and logged out. Works fine.

3. Triggering session save with several "modified" clients and cancel logging
out in one of them. In my case they were KWrite again with an unsaved document
and Kate with an unsaved document. Here I tried two sub-clauses:

    a) at first, say "don't save" to KWrite and "Cancel" to Kate. Session
continued successfully, no data is lost in both programs. Just KWin moved both
of them to "Any virtual desktop" — it's apparently the default behaviour,
appropriate for now. So works fine;

    b) finally, say "save" to KWrite and "don't save" to Kate. Session finished
and then restored successfully except Kate crashed, which is apparently
separate bug in Kate, which I will address, too. In terms of SM works fine.

As a conclusion, I think, this patch can be candidate for merge right now
without even waiting for Qt patch — there's no harm in saving documents
beforehand, but, of course, without Qt changes of this report:
https://codereview.qt-project.org/#/c/140115 applications won't be restarted.

I'm attaching the patch with my modification. If there's no objection, John,
I'd suggest you as original author to post it to https://reviewboard.kde.org so
that we can have it reviewed and potentially merged as soon as possible.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to