aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-09-16 13:11:42 (GMT)
committerrathnor <rathnor>2003-09-16 13:11:42 (GMT)
commit9859cc53d0489494536221c3b95078dddc583e61 (patch)
treec0bb9fb08231f5f5e63937ac233c526c2fb61fdd /src/FbWinFrame.cc
parent2746ab43aa20f53052ffb100d19119dc5388f260 (diff)
downloadfluxbox-9859cc53d0489494536221c3b95078dddc583e61.zip
fluxbox-9859cc53d0489494536221c3b95078dddc583e61.tar.bz2
more gravity tweaks
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 9da992c..1781fcd 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrame.cc,v 1.52 2003/09/15 20:14:49 fluxgen Exp $ 22// $Id: FbWinFrame.cc,v 1.53 2003/09/16 13:11:41 rathnor Exp $
23 23
24#include "FbWinFrame.hh" 24#include "FbWinFrame.hh"
25 25
@@ -1165,9 +1165,7 @@ void FbWinFrame::gravityTranslate(int &x, int &y, int win_gravity, bool move_fra
1165 int x_offset = 0; 1165 int x_offset = 0;
1166 int y_offset = 0; 1166 int y_offset = 0;
1167 1167
1168 // no X offset, since we don't have extra frame on the sides 1168 // mostly no X offset, since we don't have extra frame on the sides
1169
1170 // then y offset
1171 switch (win_gravity) { 1169 switch (win_gravity) {
1172 case NorthWestGravity: 1170 case NorthWestGravity:
1173 case NorthGravity: 1171 case NorthGravity:
@@ -1180,18 +1178,28 @@ void FbWinFrame::gravityTranslate(int &x, int &y, int win_gravity, bool move_fra
1180 // window shifted down by height of titlebar, and the handle 1178 // window shifted down by height of titlebar, and the handle
1181 // since that's necessary to get the bottom of the frame 1179 // since that's necessary to get the bottom of the frame
1182 // all the way up 1180 // all the way up
1183 y_offset = -(m_titlebar.height() + m_titlebar.borderWidth() 1181 if (m_use_titlebar)
1184 + m_handle.height() + m_handle.borderWidth()); 1182 y_offset -= m_titlebar.height() + m_titlebar.borderWidth();
1183 if (m_use_handle)
1184 y_offset -= m_handle.height() + m_handle.borderWidth();
1185 break; 1185 break;
1186 case WestGravity: 1186 case WestGravity:
1187 case EastGravity: 1187 case EastGravity:
1188 case CenterGravity: 1188 case CenterGravity:
1189 // these centered ones are a little more interesting 1189 // these centered ones are a little more interesting
1190 y_offset = -(m_titlebar.height() + m_titlebar.borderWidth() 1190 if (m_use_titlebar)
1191 + m_handle.height() + m_handle.borderWidth()) / 2; 1191 y_offset -= m_titlebar.height() + m_titlebar.borderWidth();
1192 if (m_use_handle)
1193 y_offset -= m_handle.height() + m_handle.borderWidth();
1194 y_offset /= 2;
1192 break; 1195 break;
1193 case StaticGravity: 1196 case StaticGravity:
1194 y_offset = -(m_titlebar.height() + m_titlebar.borderWidth()); 1197 if (m_use_titlebar)
1198 y_offset -= m_titlebar.height() + m_titlebar.borderWidth();
1199 // static is the only one that also has the
1200 // border taken into account
1201 x_offset -= m_window.borderWidth();
1202 y_offset -= m_window.borderWidth();
1195 break; 1203 break;
1196 } 1204 }
1197 1205