Changeset View
Changeset View
Standalone View
Standalone View
shell_client.cpp
Show First 20 Lines • Show All 610 Lines • ▼ Show 20 Line(s) | 601 | if (areGeometryUpdatesBlocked()) { | |||
---|---|---|---|---|---|
611 | return; | 611 | return; | ||
612 | } | 612 | } | ||
613 | if (pendingGeometryUpdate() != PendingGeometryNone) { | 613 | if (pendingGeometryUpdate() != PendingGeometryNone) { | ||
614 | // reset geometry to the one before blocking, so that we can compare properly | 614 | // reset geometry to the one before blocking, so that we can compare properly | ||
615 | geom = geometryBeforeUpdateBlocking(); | 615 | geom = geometryBeforeUpdateBlocking(); | ||
616 | } | 616 | } | ||
617 | // TODO: better merge with Client's implementation | 617 | // TODO: better merge with Client's implementation | ||
618 | const QSize requestedClientSize = QSize(w, h) - QSize(borderLeft() + borderRight(), borderTop() + borderBottom()); | 618 | const QSize requestedClientSize = QSize(w, h) - QSize(borderLeft() + borderRight(), borderTop() + borderBottom()); | ||
619 | if (requestedClientSize == m_clientSize && !isWaitingForMoveResizeSync()) { | 619 | | ||
620 | // size didn't change, update directly | 620 | if (requestedClientSize == m_clientSize && !isWaitingForMoveResizeSync() && | ||
621 | (m_requestedClientSize.isEmpty() || requestedClientSize == m_requestedClientSize)) { | ||||
622 | // size didn't change, and we don't need to explicitly request a new size | ||||
621 | doSetGeometry(QRect(x, y, w, h)); | 623 | doSetGeometry(QRect(x, y, w, h)); | ||
622 | updateMaximizeMode(m_requestedMaximizeMode); | 624 | updateMaximizeMode(m_requestedMaximizeMode); | ||
623 | } else { | 625 | } else { | ||
624 | // size did change, Client needs to provide a new buffer | 626 | // size did change, Client needs to provide a new buffer | ||
625 | requestGeometry(QRect(x, y, w, h)); | 627 | requestGeometry(QRect(x, y, w, h)); | ||
626 | } | 628 | } | ||
627 | } | 629 | } | ||
628 | 630 | | |||
▲ Show 20 Lines • Show All 1016 Lines • ▼ Show 20 Line(s) | 1646 | default: | |||
1645 | popupPosAdjust.setY(qRound(-popupSize.height() / 2.0)); | 1647 | popupPosAdjust.setY(qRound(-popupSize.height() / 2.0)); | ||
1646 | } | 1648 | } | ||
1647 | 1649 | | |||
1648 | return anchorPoint + popupPosAdjust; | 1650 | return anchorPoint + popupPosAdjust; | ||
1649 | } | 1651 | } | ||
1650 | 1652 | | |||
1651 | bool ShellClient::isWaitingForMoveResizeSync() const | 1653 | bool ShellClient::isWaitingForMoveResizeSync() const | ||
1652 | { | 1654 | { | ||
1655 | if (m_shellSurface) { | ||||
1653 | return !m_pendingConfigureRequests.isEmpty(); | 1656 | return !m_pendingConfigureRequests.isEmpty(); | ||
1654 | } | 1657 | } | ||
1658 | return false; | ||||
1659 | } | ||||
1655 | 1660 | | |||
1656 | void ShellClient::doResizeSync() | 1661 | void ShellClient::doResizeSync() | ||
1657 | { | 1662 | { | ||
1658 | requestGeometry(moveResizeGeometry()); | 1663 | requestGeometry(moveResizeGeometry()); | ||
1659 | } | 1664 | } | ||
1660 | 1665 | | |||
1661 | QMatrix4x4 ShellClient::inputTransformation() const | 1666 | QMatrix4x4 ShellClient::inputTransformation() const | ||
1662 | { | 1667 | { | ||
▲ Show 20 Lines • Show All 212 Lines • Show Last 20 Lines |