void QWaylandWindow::setGeometry(const QRect &rect) { QPlatformWindow::setGeometry(rect); if (shellSurface() && window()->transientParent()) shellSurface()->updateTransientParent(window()->transientParent()); }
void QWaylandWindow::setGeometry_helper(const QRect &rect) { QPlatformWindow::setGeometry(QRect(rect.x(), rect.y(), qBound(window()->minimumWidth(), rect.width(), window()->maximumWidth()), qBound(window()->minimumHeight(), rect.height(), window()->maximumHeight()))); if (shellSurface() && window()->transientParent() && window()->type() != Qt::Popup) shellSurface()->updateTransientParent(window()->transientParent()); }
void QuickXdgPopupItem::mouseReleaseEvent(QMouseEvent *event) { Q_D(QuickXdgPopupItem); if (shellSurface()) { XdgPopupPrivate *popupPrivate = XdgPopupPrivate::get(shellSurface()); XdgShellPrivate *shellPrivate = XdgShellPrivate::get(popupPrivate->getShell()); shellPrivate->setPopupInitialUp(false); } QWaylandQuickItem::mouseReleaseEvent(event); }
void ClientWindowQuickItem::mousePressEvent(QMouseEvent *event) { Q_D(ClientWindowQuickItem); // Let mouse press go through anyway, if focus on click is enabled this // will give focus to the window before the use can drag it QWaylandQuickShellSurfaceItem::mousePressEvent(event); // If the modifier is pressed we initiate a move operation if (d->isModifierHeld && event->buttons().testFlag(Qt::LeftButton)) { QWaylandWlShellSurface *wlShellSurface = qobject_cast<QWaylandWlShellSurface *>(shellSurface()); if (wlShellSurface) { Q_EMIT wlShellSurface->startMove(compositor()->defaultSeat()); return; } QWaylandXdgSurface *xdgSurface = qobject_cast<QWaylandXdgSurface *>(shellSurface()); if (xdgSurface) { Q_EMIT xdgSurface->startMove(compositor()->defaultSeat()); return; } } }