Disable detection of ksmserver in sessionmanagement for porting

This commit is contained in:
Martin Gräßlin 2013-07-23 06:40:47 +02:00
parent 0baeb39164
commit 2b80b3b398

5
sm.cpp
View file

@ -45,9 +45,14 @@ bool SessionManager::saveState(QSessionManager& sm)
// before the WM finishes phase 1. Saving in phase 2 is // before the WM finishes phase 1. Saving in phase 2 is
// too late, as possible user interaction may change some things. // too late, as possible user interaction may change some things.
// Phase2 is still needed though (ICCCM 5.2) // Phase2 is still needed though (ICCCM 5.2)
#if KWIN_QT5_PORTING
char* sm_vendor = SmcVendor(static_cast< SmcConn >(sm.handle())); char* sm_vendor = SmcVendor(static_cast< SmcConn >(sm.handle()));
bool ksmserver = qstrcmp(sm_vendor, "KDE") == 0; bool ksmserver = qstrcmp(sm_vendor, "KDE") == 0;
free(sm_vendor); free(sm_vendor);
#else
#warning need to figure out whether the used SessionManager is ksmserver
bool ksmserver = false;
#endif
if (!sm.isPhase2()) { if (!sm.isPhase2()) {
Workspace::self()->sessionSaveStarted(); Workspace::self()->sessionSaveStarted();
if (ksmserver) // save stacking order etc. before "save file?" etc. dialogs change it if (ksmserver) // save stacking order etc. before "save file?" etc. dialogs change it