Changeset View
Changeset View
Standalone View
Standalone View
xdgshellclient.cpp
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Line(s) | 157 | } else if (m_xdgShellPopup) { | |||
---|---|---|---|---|---|
159 | connect(m_xdgShellPopup, &XdgShellPopupInterface::grabRequested, this, &XdgShellClient::handleGrabRequested); | 159 | connect(m_xdgShellPopup, &XdgShellPopupInterface::grabRequested, this, &XdgShellClient::handleGrabRequested); | ||
160 | connect(m_xdgShellPopup, &XdgShellPopupInterface::destroyed, this, &XdgShellClient::destroyClient); | 160 | connect(m_xdgShellPopup, &XdgShellPopupInterface::destroyed, this, &XdgShellClient::destroyClient); | ||
161 | } | 161 | } | ||
162 | 162 | | |||
163 | // set initial desktop | 163 | // set initial desktop | ||
164 | setDesktop(VirtualDesktopManager::self()->current()); | 164 | setDesktop(VirtualDesktopManager::self()->current()); | ||
165 | 165 | | |||
166 | // setup shadow integration | 166 | // setup shadow integration | ||
167 | getShadow(); | 167 | updateShadow(); | ||
168 | connect(surface(), &SurfaceInterface::shadowChanged, this, &Toplevel::getShadow); | 168 | connect(surface(), &SurfaceInterface::shadowChanged, this, &Toplevel::updateShadow); | ||
169 | 169 | | |||
170 | connect(waylandServer(), &WaylandServer::foreignTransientChanged, this, [this](KWayland::Server::SurfaceInterface *child) { | 170 | connect(waylandServer(), &WaylandServer::foreignTransientChanged, this, [this](KWayland::Server::SurfaceInterface *child) { | ||
171 | if (child == surface()) { | 171 | if (child == surface()) { | ||
172 | handleTransientForChanged(); | 172 | handleTransientForChanged(); | ||
173 | } | 173 | } | ||
174 | }); | 174 | }); | ||
175 | handleTransientForChanged(); | 175 | handleTransientForChanged(); | ||
176 | 176 | | |||
▲ Show 20 Lines • Show All 238 Lines • ▼ Show 20 Line(s) | 400 | { | |||
415 | updateShowOnScreenEdge(); | 415 | updateShowOnScreenEdge(); | ||
416 | } | 416 | } | ||
417 | 417 | | |||
418 | void XdgShellClient::createDecoration(const QRect &oldGeom) | 418 | void XdgShellClient::createDecoration(const QRect &oldGeom) | ||
419 | { | 419 | { | ||
420 | KDecoration2::Decoration *decoration = Decoration::DecorationBridge::self()->createDecoration(this); | 420 | KDecoration2::Decoration *decoration = Decoration::DecorationBridge::self()->createDecoration(this); | ||
421 | if (decoration) { | 421 | if (decoration) { | ||
422 | QMetaObject::invokeMethod(decoration, "update", Qt::QueuedConnection); | 422 | QMetaObject::invokeMethod(decoration, "update", Qt::QueuedConnection); | ||
423 | connect(decoration, &KDecoration2::Decoration::shadowChanged, this, &Toplevel::getShadow); | 423 | connect(decoration, &KDecoration2::Decoration::shadowChanged, this, &Toplevel::updateShadow); | ||
424 | connect(decoration, &KDecoration2::Decoration::bordersChanged, this, | 424 | connect(decoration, &KDecoration2::Decoration::bordersChanged, this, | ||
425 | [this]() { | 425 | [this]() { | ||
426 | GeometryUpdatesBlocker blocker(this); | 426 | GeometryUpdatesBlocker blocker(this); | ||
427 | RequestGeometryBlocker requestBlocker(this); | 427 | RequestGeometryBlocker requestBlocker(this); | ||
428 | QRect oldgeom = geometry(); | 428 | QRect oldgeom = geometry(); | ||
429 | if (!isShade()) | 429 | if (!isShade()) | ||
430 | checkWorkspacePosition(oldgeom); | 430 | checkWorkspacePosition(oldgeom); | ||
431 | emit geometryShapeChanged(this, oldgeom); | 431 | emit geometryShapeChanged(this, oldgeom); | ||
Show All 27 Lines | 444 | { | |||
459 | } | 459 | } | ||
460 | if (m_xdgDecoration) { | 460 | if (m_xdgDecoration) { | ||
461 | auto mode = isDecorated() || m_userNoBorder ? XdgDecorationInterface::Mode::ServerSide: XdgDecorationInterface::Mode::ClientSide; | 461 | auto mode = isDecorated() || m_userNoBorder ? XdgDecorationInterface::Mode::ServerSide: XdgDecorationInterface::Mode::ClientSide; | ||
462 | m_xdgDecoration->configure(mode); | 462 | m_xdgDecoration->configure(mode); | ||
463 | if (m_requestGeometryBlockCounter == 0) { | 463 | if (m_requestGeometryBlockCounter == 0) { | ||
464 | m_xdgShellSurface->configure(xdgSurfaceStates(), m_requestedClientSize); | 464 | m_xdgShellSurface->configure(xdgSurfaceStates(), m_requestedClientSize); | ||
465 | } | 465 | } | ||
466 | } | 466 | } | ||
467 | getShadow(); | 467 | updateShadow(); | ||
468 | if (check_workspace_pos) | 468 | if (check_workspace_pos) | ||
469 | checkWorkspacePosition(oldgeom, -2, oldClientGeom); | 469 | checkWorkspacePosition(oldgeom, -2, oldClientGeom); | ||
470 | blockGeometryUpdates(false); | 470 | blockGeometryUpdates(false); | ||
471 | } | 471 | } | ||
472 | 472 | | |||
473 | void XdgShellClient::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) | 473 | void XdgShellClient::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) | ||
474 | { | 474 | { | ||
475 | const QRect newGeometry = rules()->checkGeometry(QRect(x, y, w, h)); | 475 | const QRect newGeometry = rules()->checkGeometry(QRect(x, y, w, h)); | ||
▲ Show 20 Lines • Show All 1463 Lines • Show Last 20 Lines |