Changeset View
Changeset View
Standalone View
Standalone View
client.cpp
Show All 26 Lines | |||||
27 | #include "atoms.h" | 27 | #include "atoms.h" | ||
28 | #include "client_machine.h" | 28 | #include "client_machine.h" | ||
29 | #include "composite.h" | 29 | #include "composite.h" | ||
30 | #include "cursor.h" | 30 | #include "cursor.h" | ||
31 | #include "deleted.h" | 31 | #include "deleted.h" | ||
32 | #include "focuschain.h" | 32 | #include "focuschain.h" | ||
33 | #include "group.h" | 33 | #include "group.h" | ||
34 | #include "shadow.h" | 34 | #include "shadow.h" | ||
35 | #ifdef KWIN_BUILD_TABBOX | ||||
36 | #include "tabbox.h" | ||||
37 | #endif | ||||
35 | #include "workspace.h" | 38 | #include "workspace.h" | ||
36 | #include "screenedge.h" | 39 | #include "screenedge.h" | ||
37 | #include "decorations/decorationbridge.h" | 40 | #include "decorations/decorationbridge.h" | ||
38 | #include "decorations/decoratedclient.h" | 41 | #include "decorations/decoratedclient.h" | ||
39 | #include <KDecoration2/Decoration> | 42 | #include <KDecoration2/Decoration> | ||
40 | #include <KDecoration2/DecoratedClient> | 43 | #include <KDecoration2/DecoratedClient> | ||
41 | // KDE | 44 | // KDE | ||
42 | #include <KLocalizedString> | 45 | #include <KLocalizedString> | ||
▲ Show 20 Lines • Show All 169 Lines • ▼ Show 20 Line(s) | |||||
212 | 215 | | |||
213 | /** | 216 | /** | ||
214 | * Releases the window. The client has done its job and the window is still existing. | 217 | * Releases the window. The client has done its job and the window is still existing. | ||
215 | **/ | 218 | **/ | ||
216 | void Client::releaseWindow(bool on_shutdown) | 219 | void Client::releaseWindow(bool on_shutdown) | ||
217 | { | 220 | { | ||
218 | assert(!deleting); | 221 | assert(!deleting); | ||
219 | deleting = true; | 222 | deleting = true; | ||
223 | #ifdef KWIN_BUILD_TABBOX | ||||
224 | TabBox::TabBox *tabBox = TabBox::TabBox::self(); | ||||
225 | if (tabBox->isDisplayed() && tabBox->currentClient() == this) { | ||||
226 | tabBox->nextPrev(true); | ||||
227 | } | ||||
228 | #endif | ||||
220 | destroyWindowManagementInterface(); | 229 | destroyWindowManagementInterface(); | ||
221 | Deleted* del = NULL; | 230 | Deleted* del = NULL; | ||
222 | if (!on_shutdown) { | 231 | if (!on_shutdown) { | ||
223 | del = Deleted::create(this); | 232 | del = Deleted::create(this); | ||
224 | } | 233 | } | ||
225 | if (isMoveResize()) | 234 | if (isMoveResize()) | ||
226 | emit clientFinishUserMovedResized(this); | 235 | emit clientFinishUserMovedResized(this); | ||
227 | emit windowClosed(this, del); | 236 | emit windowClosed(this, del); | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
282 | /** | 291 | /** | ||
283 | * Like releaseWindow(), but this one is called when the window has been already destroyed | 292 | * Like releaseWindow(), but this one is called when the window has been already destroyed | ||
284 | * (E.g. The application closed it) | 293 | * (E.g. The application closed it) | ||
285 | **/ | 294 | **/ | ||
286 | void Client::destroyClient() | 295 | void Client::destroyClient() | ||
287 | { | 296 | { | ||
288 | assert(!deleting); | 297 | assert(!deleting); | ||
289 | deleting = true; | 298 | deleting = true; | ||
299 | #ifdef KWIN_BUILD_TABBOX | ||||
300 | TabBox::TabBox *tabBox = TabBox::TabBox::self(); | ||||
301 | if (tabBox->isDisplayed() && tabBox->currentClient() == this) { | ||||
302 | tabBox->nextPrev(true); | ||||
303 | } | ||||
304 | #endif | ||||
290 | destroyWindowManagementInterface(); | 305 | destroyWindowManagementInterface(); | ||
291 | Deleted* del = Deleted::create(this); | 306 | Deleted* del = Deleted::create(this); | ||
292 | if (isMoveResize()) | 307 | if (isMoveResize()) | ||
293 | emit clientFinishUserMovedResized(this); | 308 | emit clientFinishUserMovedResized(this); | ||
294 | emit windowClosed(this, del); | 309 | emit windowClosed(this, del); | ||
295 | finishCompositing(ReleaseReason::Destroyed); | 310 | finishCompositing(ReleaseReason::Destroyed); | ||
296 | RuleBook::self()->discardUsed(this, true); // Remove ForceTemporarily rules | 311 | RuleBook::self()->discardUsed(this, true); // Remove ForceTemporarily rules | ||
297 | StackingUpdatesBlocker blocker(workspace()); | 312 | StackingUpdatesBlocker blocker(workspace()); | ||
▲ Show 20 Lines • Show All 1828 Lines • Show Last 20 Lines |