SVN commit 1083334 by lmurray: Provide more information about the logout status to the compositor so it can do nicer logout effects. CCMAIL: kwin@kde.org M +3 -0 shutdown.cpp M +19 -1 shutdowndlg.cpp M +1 -0 shutdowndlg.h --- trunk/KDE/kdebase/workspace/ksmserver/shutdown.cpp #1083333:1083334 @@ -220,6 +220,8 @@ } if ( clients.isEmpty() ) completeShutdownOrCheckpoint(); + } else { + KSMShutdownFeedback::logoutCanceled(); // make the screen become normal again } dialogActive = false; } @@ -369,6 +371,7 @@ { Solid::PowerManagement::stopSuppressingSleep(inhibitCookie); kDebug( 1218 ) << "Client " << c->program() << " (" << c->clientId() << ") canceled shutdown."; + KSMShutdownFeedback::logoutCanceled(); // make the screen become normal again KNotification::event( "cancellogout" , i18n( "Logout canceled by '%1'", c->program()), QPixmap() , 0l , KNotification::DefaultEvent ); clientInteracting = 0; --- trunk/KDE/kdebase/workspace/ksmserver/shutdowndlg.cpp #1083333:1083334 @@ -120,8 +120,16 @@ if( props != NULL ) XFree( props ); } - if( wmsupport ) + if( wmsupport ) { + // Announce that the user MAY be logging out (Intended for the compositor) + Atom announce = XInternAtom(dpy, "_KDE_LOGGING_OUT", False); + unsigned char dummy = 0; + XChangeProperty(dpy, QX11Info::appRootWindow(), announce, announce, 8, PropModeReplace, + &dummy, 1); + + // Don't show our own effect return; + } } s_pSelf = new KSMShutdownFeedback(); s_pSelf->show(); @@ -133,6 +141,16 @@ s_pSelf = NULL; } +void KSMShutdownFeedback::logoutCanceled() +{ + if( KWindowSystem::compositingActive()) { + // We are no longer logging out, announce (Intended for the compositor) + Display* dpy = QX11Info::display(); + Atom announce = XInternAtom(dpy, "_KDE_LOGGING_OUT", False); + XDeleteProperty(QX11Info::display(), QX11Info::appRootWindow(), announce); + } +} + //////////// KSMPushButton::KSMPushButton( const QString &text, QWidget *parent, bool smallButton ) --- trunk/KDE/kdebase/workspace/ksmserver/shutdowndlg.h #1083333:1083334 @@ -49,6 +49,7 @@ public: static void start(); static void stop(); + static void logoutCanceled(); protected: ~KSMShutdownFeedback() {} _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin