Changeset View
Changeset View
Standalone View
Standalone View
sm.cpp
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | |||||
103 | void Workspace::storeSession(KConfig* config, SMSavePhase phase) | 103 | void Workspace::storeSession(KConfig* config, SMSavePhase phase) | ||
104 | { | 104 | { | ||
105 | KConfigGroup cg(config, "Session"); | 105 | KConfigGroup cg(config, "Session"); | ||
106 | int count = 0; | 106 | int count = 0; | ||
107 | int active_client = -1; | 107 | int active_client = -1; | ||
108 | 108 | | |||
109 | for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) { | 109 | for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) { | ||
110 | Client* c = (*it); | 110 | Client* c = (*it); | ||
111 | if (c->windowType() > NET::Splash) { | ||||
112 | //window types outside this are not tooltips/menus/OSDs | ||||
113 | //typically these will be unmanaged and not in this list anyway, but that is not enforced | ||||
114 | continue; | ||||
115 | } | ||||
111 | QByteArray sessionId = c->sessionId(); | 116 | QByteArray sessionId = c->sessionId(); | ||
112 | QByteArray wmCommand = c->wmCommand(); | 117 | QByteArray wmCommand = c->wmCommand(); | ||
113 | if (sessionId.isEmpty()) | 118 | if (sessionId.isEmpty()) | ||
114 | // remember also applications that are not XSMP capable | 119 | // remember also applications that are not XSMP capable | ||
115 | // and use the obsolete WM_COMMAND / WM_SAVE_YOURSELF | 120 | // and use the obsolete WM_COMMAND / WM_SAVE_YOURSELF | ||
116 | if (wmCommand.isEmpty()) | 121 | if (wmCommand.isEmpty()) | ||
117 | continue; | 122 | continue; | ||
118 | count++; | 123 | count++; | ||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | |||||
179 | void Workspace::storeSubSession(const QString &name, QSet<QByteArray> sessionIds) | 184 | void Workspace::storeSubSession(const QString &name, QSet<QByteArray> sessionIds) | ||
180 | { | 185 | { | ||
181 | //TODO clear it first | 186 | //TODO clear it first | ||
182 | KConfigGroup cg(KSharedConfig::openConfig(), QLatin1String("SubSession: ") + name); | 187 | KConfigGroup cg(KSharedConfig::openConfig(), QLatin1String("SubSession: ") + name); | ||
183 | int count = 0; | 188 | int count = 0; | ||
184 | int active_client = -1; | 189 | int active_client = -1; | ||
185 | for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) { | 190 | for (ClientList::Iterator it = clients.begin(); it != clients.end(); ++it) { | ||
186 | Client* c = (*it); | 191 | Client* c = (*it); | ||
192 | if (c->windowType() > NET::Splash) { | ||||
193 | continue; | ||||
194 | } | ||||
187 | QByteArray sessionId = c->sessionId(); | 195 | QByteArray sessionId = c->sessionId(); | ||
188 | QByteArray wmCommand = c->wmCommand(); | 196 | QByteArray wmCommand = c->wmCommand(); | ||
189 | if (sessionId.isEmpty()) | 197 | if (sessionId.isEmpty()) | ||
190 | // remember also applications that are not XSMP capable | 198 | // remember also applications that are not XSMP capable | ||
191 | // and use the obsolete WM_COMMAND / WM_SAVE_YOURSELF | 199 | // and use the obsolete WM_COMMAND / WM_SAVE_YOURSELF | ||
192 | if (wmCommand.isEmpty()) | 200 | if (wmCommand.isEmpty()) | ||
193 | continue; | 201 | continue; | ||
194 | if (!sessionIds.contains(sessionId)) | 202 | if (!sessionIds.contains(sessionId)) | ||
▲ Show 20 Lines • Show All 334 Lines • Show Last 20 Lines |