Changeset View
Changeset View
Standalone View
Standalone View
geometry.cpp
Show First 20 Lines • Show All 1926 Lines • ▼ Show 20 Line(s) | 1922 | { | |||
---|---|---|---|---|---|
1927 | // from adjustedSize(). Such geometry comes here, and if the window is shaded, | 1927 | // from adjustedSize(). Such geometry comes here, and if the window is shaded, | ||
1928 | // the geometry is used only for client_size, since that one is not used when | 1928 | // the geometry is used only for client_size, since that one is not used when | ||
1929 | // shading. Then the frame geometry is adjusted for the shaded geometry. | 1929 | // shading. Then the frame geometry is adjusted for the shaded geometry. | ||
1930 | // This gets more complicated in the case the code does only something like | 1930 | // This gets more complicated in the case the code does only something like | ||
1931 | // setGeometry( geometry()) - geometry() will return the shaded frame geometry. | 1931 | // setGeometry( geometry()) - geometry() will return the shaded frame geometry. | ||
1932 | // Such code is wrong and should be changed to handle the case when the window is shaded, | 1932 | // Such code is wrong and should be changed to handle the case when the window is shaded, | ||
1933 | // for example using Client::clientSize() | 1933 | // for example using Client::clientSize() | ||
1934 | 1934 | | |||
1935 | const QMargins frameMargins(borderLeft(), borderTop(), borderRight(), borderBottom()); | | |||
1936 | | ||||
1937 | QRect geometry = rect; | 1935 | QRect geometry = rect; | ||
1938 | 1936 | | |||
1939 | if (shade_geometry_change) | 1937 | if (shade_geometry_change) | ||
1940 | ; // nothing | 1938 | ; // nothing | ||
1941 | else if (isShade()) { | 1939 | else if (isShade()) { | ||
1942 | if (geometry.height() == borderTop() + borderBottom()) { | 1940 | if (geometry.height() == borderTop() + borderBottom()) { | ||
1943 | qCDebug(KWIN_CORE) << "Shaded geometry passed for size:"; | 1941 | qCDebug(KWIN_CORE) << "Shaded geometry passed for size:"; | ||
1944 | } else { | 1942 | } else { | ||
1945 | client_size = rect.marginsRemoved(frameMargins).size(); | 1943 | client_size = rect.marginsRemoved(frameMargins()).size(); | ||
1946 | geometry.setHeight(borderTop() + borderBottom()); | 1944 | geometry.setHeight(borderTop() + borderBottom()); | ||
1947 | } | 1945 | } | ||
1948 | } else { | 1946 | } else { | ||
1949 | client_size = rect.marginsRemoved(frameMargins).size(); | 1947 | client_size = rect.marginsRemoved(frameMargins()).size(); | ||
1950 | } | 1948 | } | ||
1951 | if (!areGeometryUpdatesBlocked() && geometry != rules()->checkGeometry(geometry)) { | 1949 | if (!areGeometryUpdatesBlocked() && geometry != rules()->checkGeometry(geometry)) { | ||
1952 | qCDebug(KWIN_CORE) << "forced geometry fail:" << geometry << ":" << rules()->checkGeometry(geometry); | 1950 | qCDebug(KWIN_CORE) << "forced geometry fail:" << geometry << ":" << rules()->checkGeometry(geometry); | ||
1953 | } | 1951 | } | ||
1954 | if (force == NormalGeometrySet && geom == geometry && pendingGeometryUpdate() == PendingGeometryNone) | 1952 | if (force == NormalGeometrySet && geom == geometry && pendingGeometryUpdate() == PendingGeometryNone) | ||
1955 | return; | 1953 | return; | ||
1956 | geom = geometry; | 1954 | geom = geometry; | ||
1957 | if (areGeometryUpdatesBlocked()) { | 1955 | if (areGeometryUpdatesBlocked()) { | ||
▲ Show 20 Lines • Show All 1488 Lines • Show Last 20 Lines |