Changeset View
Changeset View
Standalone View
Standalone View
internal_client.cpp
Show First 20 Lines • Show All 490 Lines • ▼ Show 20 Line(s) | |||||
491 | 491 | | |||
492 | bool InternalClient::belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const | 492 | bool InternalClient::belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const | ||
493 | { | 493 | { | ||
494 | Q_UNUSED(checks) | 494 | Q_UNUSED(checks) | ||
495 | 495 | | |||
496 | return qobject_cast<const InternalClient *>(other) != nullptr; | 496 | return qobject_cast<const InternalClient *>(other) != nullptr; | ||
497 | } | 497 | } | ||
498 | 498 | | |||
499 | void InternalClient::destroyDecoration() | | |||
500 | { | | |||
501 | if (!isDecorated()) { | | |||
502 | return; | | |||
503 | } | | |||
504 | | ||||
505 | const QRect clientGeometry = frameRectToClientRect(frameGeometry()); | | |||
506 | AbstractClient::destroyDecoration(); | | |||
507 | setFrameGeometry(clientGeometry); | | |||
508 | } | | |||
509 | | ||||
510 | void InternalClient::doMove(int x, int y) | 499 | void InternalClient::doMove(int x, int y) | ||
511 | { | 500 | { | ||
512 | Q_UNUSED(x) | 501 | Q_UNUSED(x) | ||
513 | Q_UNUSED(y) | 502 | Q_UNUSED(y) | ||
514 | 503 | | |||
515 | syncGeometryToInternalWindow(); | 504 | syncGeometryToInternalWindow(); | ||
516 | } | 505 | } | ||
517 | 506 | | |||
Show All 14 Lines | 519 | do { | |||
532 | i++; | 521 | i++; | ||
533 | } while (findClientWithSameCaption()); | 522 | } while (findClientWithSameCaption()); | ||
534 | } | 523 | } | ||
535 | if (m_captionSuffix != oldSuffix) { | 524 | if (m_captionSuffix != oldSuffix) { | ||
536 | emit captionChanged(); | 525 | emit captionChanged(); | ||
537 | } | 526 | } | ||
538 | } | 527 | } | ||
539 | 528 | | |||
540 | void InternalClient::createDecoration(const QRect &rect) | | |||
541 | { | | |||
542 | KDecoration2::Decoration *decoration = Decoration::DecorationBridge::self()->createDecoration(this); | | |||
543 | if (decoration) { | | |||
544 | QMetaObject::invokeMethod(decoration, "update", Qt::QueuedConnection); | | |||
545 | connect(decoration, &KDecoration2::Decoration::shadowChanged, this, &Toplevel::updateShadow); | | |||
546 | connect(decoration, &KDecoration2::Decoration::bordersChanged, this, | | |||
547 | [this]() { | | |||
548 | GeometryUpdatesBlocker blocker(this); | | |||
549 | const QRect oldGeometry = frameGeometry(); | | |||
550 | if (!isShade()) { | | |||
551 | checkWorkspacePosition(oldGeometry); | | |||
552 | } | | |||
553 | emit geometryShapeChanged(this, oldGeometry); | | |||
554 | } | | |||
555 | ); | | |||
556 | } | | |||
557 | | ||||
558 | const QRect oldFrameGeometry = frameGeometry(); | | |||
559 | | ||||
560 | setDecoration(decoration); | | |||
561 | setFrameGeometry(clientRectToFrameRect(rect)); | | |||
562 | | ||||
563 | emit geometryShapeChanged(this, oldFrameGeometry); | | |||
564 | } | | |||
565 | | ||||
566 | void InternalClient::requestGeometry(const QRect &rect) | 529 | void InternalClient::requestGeometry(const QRect &rect) | ||
567 | { | 530 | { | ||
568 | if (m_internalWindow) { | 531 | if (m_internalWindow) { | ||
569 | m_internalWindow->setGeometry(frameRectToClientRect(rect)); | 532 | m_internalWindow->setGeometry(frameRectToClientRect(rect)); | ||
570 | } | 533 | } | ||
571 | } | 534 | } | ||
572 | 535 | | |||
573 | void InternalClient::commitGeometry(const QRect &rect) | 536 | void InternalClient::commitGeometry(const QRect &rect) | ||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |