diff --git a/geometry.cpp b/geometry.cpp index 4cf35d97b8..0aa3c5ddd2 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -155,7 +155,8 @@ QRect Workspace::clientArea( clientAreaOption opt, const QPoint& p, int desktop break; } - if( workarea[ desktop ].isNull() || opt == FullArea || opt == MaximizeFullArea || opt == ScreenArea ) + if( workarea[ desktop ].isNull() || opt == FullArea || opt == MaximizeFullArea + || opt == ScreenArea || opt == MovementArea ) return rect; return workarea[ desktop ].intersect(rect); diff --git a/placement.cpp b/placement.cpp index 7eab74c943..ea2dc0d6ab 100644 --- a/placement.cpp +++ b/placement.cpp @@ -504,6 +504,7 @@ void Client::growHorizontal() { int newright = workspace()->packPositionRight( this, geom.right() + xSizeHint.width_inc - 1, true ); // check that it hasn't grown outside of the area, due to size increments + // TODO this may be wrong? if( workspace()->clientArea( MovementArea, QPoint(( x() + newright ) / 2, geometry().center().y()), desktop()).right() >= newright ) geom.setRight( newright ); diff --git a/utils.h b/utils.h index b8faa45efa..ee172287fb 100644 --- a/utils.h +++ b/utils.h @@ -79,7 +79,7 @@ enum ForceGeometry_t { NormalGeometrySet, ForceGeometrySet }; enum clientAreaOption { PlacementArea, // geometry where a window will be initially placed after being mapped - MovementArea, // ??? window movement snapping area? + MovementArea, // ??? window movement snapping area? ignore struts MaximizeArea, // geometry to which a window will be maximized MaximizeFullArea, // like MaximizeArea, but ignore struts - used e.g. for fullscreening WorkArea, // whole workarea (all screens together)