From 56580b2321ddd3e8b8620a0972723bdd7375eef9 Mon Sep 17 00:00:00 2001
From: mathias <mathias>
Date: Tue, 5 Jul 2005 21:57:33 +0000
Subject: respect border size in the MoveTo action, especially at the right and
 lower border of the screen.

---
 ChangeLog               | 2 ++
 src/CurrentWindowCmd.cc | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1b20bc3..a007e54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 (Format: Year/Month/Day)
 Changes for 0.9.14:
 *05/07/05:
+  * Respect border size in the MoveTo action (Mathias)
+    CurrentWindowCmd.cc
   * Added kcommander, Valknut, dcgui-qt, quickdc, asami, amsn to fbgm (Mathias)
     fluxbox-generate_menu.in
 *05/06/30:
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index f6b38aa..084362b 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -143,11 +143,11 @@ void MoveToCmd::real_execute() {
     const int head = fbwindow().screen().getHead(fbwindow().fbWindow());
     
     if (m_refc & MoveToCmd::LOWER)
-        y = fbwindow().screen().maxBottom(head) - fbwindow().height() - m_step_size_y;
+        y = fbwindow().screen().maxBottom(head) - fbwindow().height() - 2 * fbwindow().frame().window().borderWidth() - m_step_size_y;
     if (m_refc & MoveToCmd::UPPER)
         y = fbwindow().screen().maxTop(head) + m_step_size_y;
     if (m_refc & MoveToCmd::RIGHT)
-        x = fbwindow().screen().maxRight(head) - fbwindow().width() - m_step_size_x;
+        x = fbwindow().screen().maxRight(head) - fbwindow().width() - 2 * fbwindow().frame().window().borderWidth() - m_step_size_x;
     if (m_refc & MoveToCmd::LEFT)
         x = fbwindow().screen().maxLeft(head) + m_step_size_x;
 
-- 
cgit v0.11.2