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 = frameGeometry(); | ||
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 733 Lines • ▼ Show 20 Line(s) | 909 | { | |||
937 | workspace()->updateClientLayer(this); // active fullscreens get different layer | 937 | workspace()->updateClientLayer(this); // active fullscreens get different layer | ||
938 | updateDecoration(false, false); | 938 | updateDecoration(false, false); | ||
939 | 939 | | |||
940 | if (set) { | 940 | if (set) { | ||
941 | setFrameGeometry(workspace()->clientArea(FullScreenArea, this)); | 941 | setFrameGeometry(workspace()->clientArea(FullScreenArea, this)); | ||
942 | } else { | 942 | } else { | ||
943 | if (m_geomFsRestore.isValid()) { | 943 | if (m_geomFsRestore.isValid()) { | ||
944 | int currentScreen = screen(); | 944 | int currentScreen = screen(); | ||
945 | setFrameGeometry(QRect(m_geomFsRestore.topLeft(), adjustedSize(m_geomFsRestore.size()))); | 945 | setFrameGeometry(QRect(m_geomFsRestore.topLeft(), constrainFrameSize(m_geomFsRestore.size()))); | ||
946 | if( currentScreen != screen()) | 946 | if( currentScreen != screen()) | ||
947 | workspace()->sendClientToScreen( this, currentScreen ); | 947 | workspace()->sendClientToScreen( this, currentScreen ); | ||
948 | } else { | 948 | } else { | ||
949 | // this can happen when the window was first shown already fullscreen, | 949 | // this can happen when the window was first shown already fullscreen, | ||
950 | // so let the client set the size by itself | 950 | // so let the client set the size by itself | ||
951 | setFrameGeometry(QRect(workspace()->clientArea(PlacementArea, this).topLeft(), QSize(0, 0))); | 951 | setFrameGeometry(QRect(workspace()->clientArea(PlacementArea, this).topLeft(), QSize(0, 0))); | ||
952 | } | 952 | } | ||
953 | } | 953 | } | ||
▲ Show 20 Lines • Show All 1111 Lines • Show Last 20 Lines |