Commit 9b857cce authored by David Edmundson's avatar David Edmundson
Browse files

[ksmserver] Drop unused logout effect widget

Summary:
At some point there was an effect in kwin to fade to a grey (with a
weird vigenette effect) as one logs out.

This was signalled with a fake offscreen window with a special window
ID.

The kwin effect has gone, deleted in Plasma 5.8 with
af80a546bfe258b54468b159bb8cf78f16ca9ebf

(Kwin still contains an effect called logout, but that's merely for the
logout prompt)

I intend to replace this logout effect but as I'm going to start from
scratch we may as well communicate from ksmserver -> kwin with a new API
that works on wayland and and solves some other issues all in one.

Test Plan: Compiles

Reviewers: #plasma, #kwin, apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24759
parent b3065f7d
...@@ -58,12 +58,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ...@@ -58,12 +58,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#endif #endif
#include <QApplication> #include <QApplication>
#include <QPushButton>
#include <QTimer> #include <QTimer>
#include <QFile> #include <QFile>
#include <QProcess>
#include <QFutureWatcher> #include <QFutureWatcher>
#include <QtConcurrentRun> #include <QtConcurrentRun>
#include <QDesktopWidget>
#include <KConfig> #include <KConfig>
#include <KSharedConfig> #include <KSharedConfig>
...@@ -79,11 +78,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ...@@ -79,11 +78,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "logoutprompt_interface.h" #include "logoutprompt_interface.h"
#include "shutdown_interface.h" #include "shutdown_interface.h"
#include <QDesktopWidget>
#include <QX11Info>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
void KSMServer::logout( int confirm, int sdtype, int sdmode ) void KSMServer::logout( int confirm, int sdtype, int sdmode )
{ {
// KDE5: remove me // KDE5: remove me
...@@ -505,8 +499,6 @@ void KSMServer::completeShutdownOrCheckpoint() ...@@ -505,8 +499,6 @@ void KSMServer::completeShutdownOrCheckpoint()
startKilling(); startKilling();
} }
}); });
createLogoutEffectWidget();
} else if ( state == Checkpoint ) { } else if ( state == Checkpoint ) {
foreach( KSMClient* c, clients ) { foreach( KSMClient* c, clients ) {
SmsSaveComplete( c->connection()); SmsSaveComplete( c->connection());
...@@ -561,7 +553,6 @@ void KSMServer::killWM() ...@@ -561,7 +553,6 @@ void KSMServer::killWM()
{ {
if( state != Killing ) if( state != Killing )
return; return;
delete logoutEffectWidget;
qCDebug(KSMSERVER) << "Starting killing WM"; qCDebug(KSMSERVER) << "Starting killing WM";
state = KillingWM; state = KillingWM;
...@@ -618,25 +609,6 @@ void KSMServer::timeoutWMQuit() ...@@ -618,25 +609,6 @@ void KSMServer::timeoutWMQuit()
killingCompleted(); killingCompleted();
} }
void KSMServer::createLogoutEffectWidget()
{
// Ok, this is rather a hack. In order to fade the whole desktop when playing the logout
// sound, killing applications and leaving KDE, create a dummy window that triggers
// the logout fade effect again.
logoutEffectWidget = new QWidget( nullptr, Qt::X11BypassWindowManagerHint );
logoutEffectWidget->winId(); // workaround for Qt4.3 setWindowRole() assert
logoutEffectWidget->setWindowRole( QStringLiteral( "logouteffect" ) );
// Qt doesn't set this on unmanaged windows
//FIXME: or does it?
XChangeProperty( QX11Info::display(), logoutEffectWidget->winId(),
XInternAtom( QX11Info::display(), "WM_WINDOW_ROLE", False ), XA_STRING, 8, PropModeReplace,
(unsigned char *)"logouteffect", strlen( "logouteffect" ));
logoutEffectWidget->setGeometry( -100, -100, 1, 1 );
logoutEffectWidget->show();
}
void KSMServer::saveSubSession(const QString &name, QStringList saveAndClose, QStringList saveOnly) void KSMServer::saveSubSession(const QString &name, QStringList saveAndClose, QStringList saveOnly)
{ {
if( state != Idle ) { // performing startup if( state != Idle ) { // performing startup
......
...@@ -599,7 +599,6 @@ extern "C" int _IceTransNoListen(const char * protocol); ...@@ -599,7 +599,6 @@ extern "C" int _IceTransNoListen(const char * protocol);
KSMServer::KSMServer( const QString& windowManager, InitFlags flags ) KSMServer::KSMServer( const QString& windowManager, InitFlags flags )
: wmProcess( nullptr ) : wmProcess( nullptr )
, sessionGroup( QStringLiteral( "" ) ) , sessionGroup( QStringLiteral( "" ) )
, logoutEffectWidget( nullptr )
, sockets{ -1, -1 } , sockets{ -1, -1 }
{ {
if (!flags.testFlag(InitFlag::NoLockScreen)) { if (!flags.testFlag(InitFlag::NoLockScreen)) {
......
...@@ -155,7 +155,6 @@ private: ...@@ -155,7 +155,6 @@ private:
void completeKillingWM(); void completeKillingWM();
void cancelShutdown( KSMClient* c ); void cancelShutdown( KSMClient* c );
void killingCompleted(); void killingCompleted();
void createLogoutEffectWidget();
void discardSession(); void discardSession();
void storeSession(); void storeSession();
...@@ -240,7 +239,6 @@ private: ...@@ -240,7 +239,6 @@ private:
QTimer protectionTimer; QTimer protectionTimer;
QTimer restoreTimer; QTimer restoreTimer;
QString xonCommand; QString xonCommand;
QWidget* logoutEffectWidget;
// sequential startup // sequential startup
int appsToStart; int appsToStart;
int lastAppStarted; int lastAppStarted;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment