From 589ecfc060ffebd2ec3aaf7d866f5ea885bd8aa3 Mon Sep 17 00:00:00 2001
From: mathias <mathias>
Date: Tue, 27 Feb 2007 18:07:36 +0000
Subject: respect external tabs in ArrangeWindows, patch from Tomas Janousek
 <tomi@nomi.cz>

---
 ChangeLog                         |  4 ++++
 nls/es_AR/generated-ISO-8859-15.m |  1 +
 src/WorkspaceCmd.cc               | 10 ++++++++--
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d2ac7be..23ad0dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
  (Format: Year/Month/Day)
 Changes for 1.0rc3:
+*07/02/27:
+   * Respect external tabs in ArrangeWindows (thanks to Tomas Janousek <tomi
+     at nomiz dot cz>
+     WorkspaceCmd.cc
 *07/02/25:
    * Update systemtray alpha along with toolbar alpha (Mark)
      Systemtray.cc/hh
diff --git a/nls/es_AR/generated-ISO-8859-15.m b/nls/es_AR/generated-ISO-8859-15.m
index 343dad6..c556675 100644
--- a/nls/es_AR/generated-ISO-8859-15.m
+++ b/nls/es_AR/generated-ISO-8859-15.m
@@ -263,3 +263,4 @@ $set 20 #layers
 4 Dock
 5 Normal
 6 Arriba
+
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index d2bc3b7..414f942 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -233,9 +233,15 @@ void ArrangeWindowsCmd::execute() {
             }
 
             if (normal_windows.size() > 1) {
-                (*closest)->moveResize(x_offs, y_offs, cal_width, cal_height);
+                (*closest)->moveResize(x_offs + (*closest)->xOffset(),
+			y_offs + (*closest)->yOffset(),
+			cal_width - (*closest)->widthOffset(),
+			cal_height - (*closest)->heightOffset());
             } else { // the last window gets everything that is left.
-                (*closest)->moveResize(x_offs, y_offs, screen->maxRight(head)-x_offs, cal_height);
+                (*closest)->moveResize(x_offs + (*closest)->xOffset(),
+			y_offs + (*closest)->yOffset(),
+			screen->maxRight(head) - x_offs - (*closest)->widthOffset(),
+			cal_height - (*closest)->heightOffset());
             }
 
             normal_windows.erase(closest);
-- 
cgit v0.11.2