diff options
author | fluxgen <fluxgen> | 2004-01-16 09:21:31 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-01-16 09:21:31 (GMT) |
commit | c2ba488919ab2c2bd4fe97f8bd8678602aeca41b (patch) | |
tree | 59d6a2f55447b60eee6d1493258a3cea82806668 | |
parent | f178cfb87a098248dffcc673bcd03f9fd54d10e1 (diff) | |
download | fluxbox_lack-c2ba488919ab2c2bd4fe97f8bd8678602aeca41b.zip fluxbox_lack-c2ba488919ab2c2bd4fe97f8bd8678602aeca41b.tar.bz2 |
use max screen area for arrange windows
-rw-r--r-- | src/WorkspaceCmd.cc | 7 |
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 |