Changeset View
Changeset View
Standalone View
Standalone View
xdgshellclient.cpp
Show First 20 Lines • Show All 464 Lines • ▼ Show 20 Line(s) | 460 | if (m_xdgDecoration) { | |||
---|---|---|---|---|---|
465 | } | 465 | } | ||
466 | } | 466 | } | ||
467 | updateShadow(); | 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::setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force) | 473 | void XdgShellClient::setFrameGeometry(const QRect &rect, ForceGeometry_t force) | ||
474 | { | 474 | { | ||
475 | const QRect newGeometry = rules()->checkGeometry(QRect(x, y, w, h)); | 475 | const QRect newGeometry = rules()->checkGeometry(rect); | ||
476 | 476 | | |||
477 | if (areGeometryUpdatesBlocked()) { | 477 | if (areGeometryUpdatesBlocked()) { | ||
478 | // when the GeometryUpdateBlocker exits the current geom is passed to setGeometry | 478 | // when the GeometryUpdateBlocker exits the current geom is passed to setGeometry | ||
479 | // thus we need to set it here. | 479 | // thus we need to set it here. | ||
480 | m_frameGeometry = newGeometry; | 480 | m_frameGeometry = newGeometry; | ||
481 | if (pendingGeometryUpdate() == PendingGeometryForced) { | 481 | if (pendingGeometryUpdate() == PendingGeometryForced) { | ||
482 | // maximum, nothing needed | 482 | // maximum, nothing needed | ||
483 | } else if (force == ForceGeometrySet) { | 483 | } else if (force == ForceGeometrySet) { | ||
▲ Show 20 Lines • Show All 821 Lines • ▼ Show 20 Line(s) | 1298 | { | |||
1305 | } | 1305 | } | ||
1306 | 1306 | | |||
1307 | updatePendingGeometry(); | 1307 | updatePendingGeometry(); | ||
1308 | 1308 | | |||
1309 | setDepth((surface()->buffer()->hasAlphaChannel() && !isDesktop()) ? 32 : 24); | 1309 | setDepth((surface()->buffer()->hasAlphaChannel() && !isDesktop()) ? 32 : 24); | ||
1310 | markAsMapped(); | 1310 | markAsMapped(); | ||
1311 | } | 1311 | } | ||
1312 | 1312 | | |||
1313 | void XdgShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force) | 1313 | void XdgShellClient::resizeWithChecks(const QSize &size, ForceGeometry_t force) | ||
1314 | { | 1314 | { | ||
1315 | const QRect area = workspace()->clientArea(WorkArea, this); | | |||
1316 | // don't allow growing larger than workarea | 1315 | // don't allow growing larger than workarea | ||
1317 | if (w > area.width()) { | 1316 | const QRect area = workspace()->clientArea(WorkArea, this); | ||
1318 | w = area.width(); | 1317 | setFrameGeometry(QRect{pos(), size.boundedTo(area.size())}, force); | ||
1319 | } | | |||
1320 | if (h > area.height()) { | | |||
1321 | h = area.height(); | | |||
1322 | } | | |||
1323 | setFrameGeometry(x(), y(), w, h, force); | | |||
1324 | } | 1318 | } | ||
1325 | 1319 | | |||
1326 | void XdgShellClient::unmap() | 1320 | void XdgShellClient::unmap() | ||
1327 | { | 1321 | { | ||
1328 | m_unmapped = true; | 1322 | m_unmapped = true; | ||
1329 | if (isMoveResize()) { | 1323 | if (isMoveResize()) { | ||
1330 | leaveMoveResize(); | 1324 | leaveMoveResize(); | ||
1331 | } | 1325 | } | ||
▲ Show 20 Lines • Show All 698 Lines • Show Last 20 Lines |