Changeset View
Changeset View
Standalone View
Standalone View
shell_client.cpp
Show First 20 Lines • Show All 419 Lines • ▼ Show 20 Line(s) | 419 | #ifdef KWIN_BUILD_TABBOX | |||
---|---|---|---|---|---|
420 | TabBox::TabBox *tabBox = TabBox::TabBox::self(); | 420 | TabBox::TabBox *tabBox = TabBox::TabBox::self(); | ||
421 | if (tabBox && tabBox->isDisplayed() && tabBox->currentClient() == this) { | 421 | if (tabBox && tabBox->isDisplayed() && tabBox->currentClient() == this) { | ||
422 | tabBox->nextPrev(true); | 422 | tabBox->nextPrev(true); | ||
423 | } | 423 | } | ||
424 | #endif | 424 | #endif | ||
425 | if (isMoveResize()) { | 425 | if (isMoveResize()) { | ||
426 | leaveMoveResize(); | 426 | leaveMoveResize(); | ||
427 | } | 427 | } | ||
428 | Deleted *del = nullptr; | 428 | | ||
429 | if (workspace()) { | 429 | Deleted *deleted = Deleted::create(this); | ||
430 | del = Deleted::create(this); | 430 | emit windowClosed(this, deleted); | ||
431 | } | | |||
432 | emit windowClosed(this, del); | | |||
433 | 431 | | |||
434 | // Remove Force Temporarily rules. | 432 | // Remove Force Temporarily rules. | ||
435 | RuleBook::self()->discardUsed(this, true); | 433 | RuleBook::self()->discardUsed(this, true); | ||
436 | 434 | | |||
437 | destroyWindowManagementInterface(); | 435 | destroyWindowManagementInterface(); | ||
438 | destroyDecoration(); | 436 | destroyDecoration(); | ||
439 | 437 | | |||
440 | if (workspace()) { | | |||
441 | StackingUpdatesBlocker blocker(workspace()); | 438 | StackingUpdatesBlocker blocker(workspace()); | ||
442 | if (transientFor()) { | 439 | if (transientFor()) { | ||
443 | transientFor()->removeTransient(this); | 440 | transientFor()->removeTransient(this); | ||
444 | } | 441 | } | ||
445 | for (auto it = transients().constBegin(); it != transients().constEnd();) { | 442 | for (auto it = transients().constBegin(); it != transients().constEnd();) { | ||
446 | if ((*it)->transientFor() == this) { | 443 | if ((*it)->transientFor() == this) { | ||
447 | removeTransient(*it); | 444 | removeTransient(*it); | ||
448 | it = transients().constBegin(); // restart, just in case something more has changed with the list | 445 | it = transients().constBegin(); // restart, just in case something more has changed with the list | ||
449 | } else { | 446 | } else { | ||
450 | ++it; | 447 | ++it; | ||
451 | } | 448 | } | ||
452 | } | 449 | } | ||
453 | } | 450 | | ||
454 | waylandServer()->removeClient(this); | 451 | waylandServer()->removeClient(this); | ||
455 | 452 | | |||
456 | if (del) { | 453 | deleted->unrefWindow(); | ||
457 | del->unrefWindow(); | | |||
458 | } | | |||
459 | m_shellSurface = nullptr; | 454 | m_shellSurface = nullptr; | ||
460 | m_xdgShellSurface = nullptr; | 455 | m_xdgShellSurface = nullptr; | ||
461 | m_xdgShellPopup = nullptr; | 456 | m_xdgShellPopup = nullptr; | ||
462 | deleteClient(this); | 457 | deleteClient(this); | ||
463 | } | 458 | } | ||
464 | 459 | | |||
465 | void ShellClient::deleteClient(ShellClient *c) | 460 | void ShellClient::deleteClient(ShellClient *c) | ||
466 | { | 461 | { | ||
▲ Show 20 Lines • Show All 1552 Lines • Show Last 20 Lines |