Changeset View
Changeset View
Standalone View
Standalone View
xdgshellclient.cpp
Show First 20 Lines • Show All 186 Lines • ▼ Show 20 Line(s) | 185 | { | |||
---|---|---|---|---|---|
187 | 187 | | |||
188 | connect(surface(), &SurfaceInterface::committed, this, &XdgShellClient::handleCommitted); | 188 | connect(surface(), &SurfaceInterface::committed, this, &XdgShellClient::handleCommitted); | ||
189 | 189 | | |||
190 | bool needsPlacement = !isInitialPositionSet(); | 190 | bool needsPlacement = !isInitialPositionSet(); | ||
191 | 191 | | |||
192 | if (supportsWindowRules()) { | 192 | if (supportsWindowRules()) { | ||
193 | setupWindowRules(false); | 193 | setupWindowRules(false); | ||
194 | 194 | | |||
195 | const QRect originalGeometry = QRect(pos(), sizeForClientSize(clientSize())); | 195 | const QRect originalGeometry = QRect(pos(), adjustedSize()); | ||
196 | const QRect ruledGeometry = rules()->checkGeometry(originalGeometry, true); | 196 | const QRect ruledGeometry = rules()->checkGeometry(originalGeometry, true); | ||
197 | if (originalGeometry != ruledGeometry) { | 197 | if (originalGeometry != ruledGeometry) { | ||
198 | setFrameGeometry(ruledGeometry); | 198 | setFrameGeometry(ruledGeometry); | ||
199 | } | 199 | } | ||
200 | 200 | | |||
201 | maximize(rules()->checkMaximize(maximizeMode(), true)); | 201 | maximize(rules()->checkMaximize(maximizeMode(), true)); | ||
202 | 202 | | |||
203 | setDesktop(rules()->checkDesktop(desktop(), true)); | 203 | setDesktop(rules()->checkDesktop(desktop(), true)); | ||
▲ Show 20 Lines • Show All 734 Lines • ▼ Show 20 Line(s) | 910 | { | |||
938 | workspace()->updateClientLayer(this); // active fullscreens get different layer | 938 | workspace()->updateClientLayer(this); // active fullscreens get different layer | ||
939 | updateDecoration(false, false); | 939 | updateDecoration(false, false); | ||
940 | 940 | | |||
941 | if (set) { | 941 | if (set) { | ||
942 | setFrameGeometry(workspace()->clientArea(FullScreenArea, this)); | 942 | setFrameGeometry(workspace()->clientArea(FullScreenArea, this)); | ||
943 | } else { | 943 | } else { | ||
944 | if (m_geomFsRestore.isValid()) { | 944 | if (m_geomFsRestore.isValid()) { | ||
945 | int currentScreen = screen(); | 945 | int currentScreen = screen(); | ||
946 | setFrameGeometry(QRect(m_geomFsRestore.topLeft(), adjustedSize(m_geomFsRestore.size()))); | 946 | setFrameGeometry(QRect(m_geomFsRestore.topLeft(), constrainFrameSize(m_geomFsRestore.size()))); | ||
947 | if( currentScreen != screen()) | 947 | if( currentScreen != screen()) | ||
948 | workspace()->sendClientToScreen( this, currentScreen ); | 948 | workspace()->sendClientToScreen( this, currentScreen ); | ||
949 | } else { | 949 | } else { | ||
950 | // this can happen when the window was first shown already fullscreen, | 950 | // this can happen when the window was first shown already fullscreen, | ||
951 | // so let the client set the size by itself | 951 | // so let the client set the size by itself | ||
952 | setFrameGeometry(QRect(workspace()->clientArea(PlacementArea, this).topLeft(), QSize(0, 0))); | 952 | setFrameGeometry(QRect(workspace()->clientArea(PlacementArea, this).topLeft(), QSize(0, 0))); | ||
953 | } | 953 | } | ||
954 | } | 954 | } | ||
▲ Show 20 Lines • Show All 1034 Lines • Show Last 20 Lines |