[effects] Add effect to hold the desktop window static after plasmashell quits
ClosedPublic

Authored by davidedmundson on Oct 22 2019, 12:48 PM.

Details

Summary

When a plasma session quits, the order of plasmashell and clients quitting is undetermined.

This looks bad as our desktop background disappears quite early. Rather than changing the real order, we can have kwin reference the last pixmap of any desktop and hold on to it.

Lasting till the compositor quits means it stays on the X frontbuffer till X quits and the experience is seamless.

Test Plan

Logged out (with relevant other ksmserver patches)

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: KWin. · View Herald TranscriptOct 22 2019, 12:48 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Oct 22 2019, 12:48 PM

Before: https://home.davidedmundson.co.uk/index.php/s/sirqCZSsKjb4Hfc
After: https://home.davidedmundson.co.uk/index.php/s/f4dSnY8s9YJaz5d

(self hosted as the files are large, and not that important)

Note the period where plasma has gone but dolphin remains.

zzag added a subscriber: zzag.Oct 22 2019, 2:43 PM
zzag added inline comments.
effects/sessionquit/package/metadata.desktop
17
X-KWin-Internal=true
libkwineffects/kwineffects.h
831–832

The comment fits 100 characters limit, no need to break it.

1378

Please write more detailed description.

libkwineffects/kwinglobals.h
151

Matter of personal choice: I'd prefer to keep Q_ENUM_NS as close as possible to the enum, without introducing empty lines in between.

davidedmundson retitled this revision from [effects] Add effect to hold the desktop window static after plasmashell quits When a plasma session quits, the order of plasmashell and clients quitting is undetermined. This looks bad as our desktop background disappears quite early. Rather... to [effects] Add effect to hold the desktop window static after plasmashell quits.Oct 22 2019, 2:44 PM
davidedmundson edited the summary of this revision. (Show Details)
zzag added inline comments.Oct 22 2019, 2:48 PM
libkwineffects/kwinglobals.h
151

s/choice/taste/ :-)

zzag added a comment.Oct 25 2019, 3:04 PM

Could you please update this revision?

/home/vlad/Workspace/KDE/src/kde/workspace/kwin/effects.cpp: In constructor ‘KWin::EffectsHandlerImpl::EffectsHandlerImpl(KWin::Compositor*, KWin::Scene*)’:
/home/vlad/Workspace/KDE/src/kde/workspace/kwin/effects.cpp:199:29: error: ‘sessionStateChanged’ is not a member of ‘KWin::Workspace’
  199 |     connect(ws, &Workspace::sessionStateChanged, this,
      |                             ^~~~~~~~~~~~~~~~~~~
/home/vlad/Workspace/KDE/src/kde/workspace/kwin/effects.cpp: In member function ‘virtual KWin::SessionState KWin::EffectsHandlerImpl::sessionState() const’:
/home/vlad/Workspace/KDE/src/kde/workspace/kwin/effects.cpp:1717:31: error: ‘class KWin::Workspace’ has no member named ‘sessionState’; did you mean ‘sessionManager’?
 1717 |     return Workspace::self()->sessionState();
      |                               ^~~~~~~~~~~~
      |                               sessionManager
davidedmundson marked 4 inline comments as done.

rebase

zzag accepted this revision.Oct 25 2019, 9:10 PM
zzag added inline comments.
scripting/scriptedeffect.cpp
637

Stray new line.

This revision is now accepted and ready to land.Oct 25 2019, 9:10 PM
This revision was automatically updated to reflect the committed changes.