Changeset View
Changeset View
Standalone View
Standalone View
xdgshellclient.cpp
Show First 20 Lines • Show All 454 Lines • ▼ Show 20 Line(s) | 453 | } else { | |||
---|---|---|---|---|---|
455 | emit windowShown(this); | 455 | emit windowShown(this); | ||
456 | } | 456 | } | ||
457 | if (shouldExposeToWindowManagement()) { | 457 | if (shouldExposeToWindowManagement()) { | ||
458 | setupWindowManagementInterface(); | 458 | setupWindowManagementInterface(); | ||
459 | } | 459 | } | ||
460 | updateShowOnScreenEdge(); | 460 | updateShowOnScreenEdge(); | ||
461 | } | 461 | } | ||
462 | 462 | | |||
463 | void XdgShellClient::createDecoration(const QRect &oldGeom) | | |||
464 | { | | |||
465 | KDecoration2::Decoration *decoration = Decoration::DecorationBridge::self()->createDecoration(this); | | |||
466 | if (decoration) { | | |||
467 | QMetaObject::invokeMethod(decoration, "update", Qt::QueuedConnection); | | |||
468 | connect(decoration, &KDecoration2::Decoration::shadowChanged, this, &Toplevel::updateShadow); | | |||
469 | connect(decoration, &KDecoration2::Decoration::bordersChanged, this, | | |||
470 | [this]() { | | |||
471 | GeometryUpdatesBlocker blocker(this); | | |||
472 | RequestGeometryBlocker requestBlocker(this); | | |||
473 | const QRect oldGeometry = frameGeometry(); | | |||
474 | if (!isShade()) { | | |||
475 | checkWorkspacePosition(oldGeometry); | | |||
476 | } | | |||
477 | emit geometryShapeChanged(this, oldGeometry); | | |||
478 | } | | |||
479 | ); | | |||
480 | } | | |||
481 | setDecoration(decoration); | | |||
482 | // TODO: ensure the new geometry still fits into the client area (e.g. maximized windows) | | |||
483 | doSetGeometry(QRect(oldGeom.topLeft(), m_windowGeometry.size() + QSize(borderLeft() + borderRight(), borderBottom() + borderTop()))); | | |||
484 | | ||||
485 | emit geometryShapeChanged(this, oldGeom); | | |||
486 | } | | |||
487 | | ||||
488 | void XdgShellClient::updateDecoration(bool check_workspace_pos, bool force) | 463 | void XdgShellClient::updateDecoration(bool check_workspace_pos, bool force) | ||
489 | { | 464 | { | ||
490 | if (!force && | 465 | if (!force && | ||
491 | ((!isDecorated() && noBorder()) || (isDecorated() && !noBorder()))) | 466 | ((!isDecorated() && noBorder()) || (isDecorated() && !noBorder()))) | ||
492 | return; | 467 | return; | ||
493 | QRect oldgeom = frameGeometry(); | 468 | QRect oldgeom = frameGeometry(); | ||
494 | QRect oldClientGeom = oldgeom.adjusted(borderLeft(), borderTop(), -borderRight(), -borderBottom()); | 469 | QRect oldClientGeom = oldgeom.adjusted(borderLeft(), borderTop(), -borderRight(), -borderBottom()); | ||
495 | blockGeometryUpdates(true); | 470 | blockGeometryUpdates(true); | ||
▲ Show 20 Lines • Show All 1579 Lines • Show Last 20 Lines |