summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/WorkspaceCmd.cc7
1 files 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 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: WorkspaceCmd.cc,v 1.9 2003/12/30 18:15:55 fluxgen Exp $ 23// $Id: WorkspaceCmd.cc,v 1.10 2004/01/16 09:21:31 fluxgen Exp $
24 24
25#include "WorkspaceCmd.hh" 25#include "WorkspaceCmd.hh"
26 26
@@ -123,8 +123,9 @@ void ArrangeWindowsCmd::execute() {
123 if (win_count == 0) 123 if (win_count == 0)
124 return; 124 return;
125 125
126 const unsigned int max_width = screen->width(); 126 const int head = screen->getCurrHead();
127 const unsigned int max_heigth = screen->height(); 127 const unsigned int max_width = screen->maxRight(head) - screen->maxLeft(head);
128 const unsigned int max_heigth = screen->maxBottom(head) - screen->maxTop(head);
128 129
129 // try to get the same number of rows as columns. 130 // try to get the same number of rows as columns.
130 unsigned int rows = int(sqrt(win_count)); // truncate to lower 131 unsigned int rows = int(sqrt(win_count)); // truncate to lower