From c2ba488919ab2c2bd4fe97f8bd8678602aeca41b Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 16 Jan 2004 09:21:31 +0000 Subject: use max screen area for arrange windows --- src/WorkspaceCmd.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc index a0132ee..33ff818 100644 --- a/src/WorkspaceCmd.cc +++ b/src/WorkspaceCmd.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: WorkspaceCmd.cc,v 1.9 2003/12/30 18:15:55 fluxgen Exp $ +// $Id: WorkspaceCmd.cc,v 1.10 2004/01/16 09:21:31 fluxgen Exp $ #include "WorkspaceCmd.hh" @@ -123,8 +123,9 @@ void ArrangeWindowsCmd::execute() { if (win_count == 0) return; - const unsigned int max_width = screen->width(); - const unsigned int max_heigth = screen->height(); + const int head = screen->getCurrHead(); + const unsigned int max_width = screen->maxRight(head) - screen->maxLeft(head); + const unsigned int max_heigth = screen->maxBottom(head) - screen->maxTop(head); // try to get the same number of rows as columns. unsigned int rows = int(sqrt(win_count)); // truncate to lower -- cgit v0.11.2