aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-09-11 13:35:37 (GMT)
committerrathnor <rathnor>2003-09-11 13:35:37 (GMT)
commit9582e35ab89e14397bf1aeaea1d98a10d4064c60 (patch)
tree06271e4e3bbd93dca66eeb1bded57123a67769f1 /src
parent01af61822de502b9457c975f3ec4015a2619686c (diff)
downloadfluxbox_paul-9582e35ab89e14397bf1aeaea1d98a10d4064c60.zip
fluxbox_paul-9582e35ab89e14397bf1aeaea1d98a10d4064c60.tar.bz2
correct temporary insanity :-/
Diffstat (limited to 'src')
-rw-r--r--src/FbWinFrame.cc37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 045ca03..3dd0f1b 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.46 2003/09/11 13:17:14 rathnor Exp $ 22// $Id: FbWinFrame.cc,v 1.47 2003/09/11 13:35:37 rathnor Exp $
23 23
24#include "FbWinFrame.hh" 24#include "FbWinFrame.hh"
25 25
@@ -38,6 +38,8 @@
38 38
39#include <algorithm> 39#include <algorithm>
40#include <iostream> 40#include <iostream>
41#include <X11/X.h>
42
41using namespace std; 43using namespace std;
42 44
43FbWinFrame::FbWinFrame(FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl, 45FbWinFrame::FbWinFrame(FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl,
@@ -1140,18 +1142,29 @@ void FbWinFrame::gravityTranslate(int &x, int &y, int win_gravity, bool move_fra
1140 1142
1141 // Start with X offset 1143 // Start with X offset
1142 switch (win_gravity) { 1144 switch (win_gravity) {
1143 case NorthWest: 1145 case NorthWestGravity:
1144 case North: 1146 case NorthGravity:
1145 case NorthEast: 1147 case NorthEastGravity:
1146 // no offset, since the top point is still the same 1148 // no offset, since the top point is still the same
1147 break; 1149 break;
1148 case SouthWest: 1150 case SouthWestGravity:
1149 case South: 1151 case SouthGravity:
1150 case SouthEast: 1152 case SouthEastGravity:
1151 case Static: 1153 // window shifted down by height of titlebar, and the handle
1152 case Center: 1154 // since that's necessary to get the bottom of the frame
1153 // window shifted down by height of titlebar 1155 // all the way up
1154 x_offset -= m_titlebar.height() + m_titlebar.borderWidth(); 1156 x_offset = -(m_titlebar.height() + m_titlebar.borderWidth()
1157 + m_handle.height() + m_handle.borderWidth());
1158 break;
1159 case WestGravity:
1160 case EastGravity:
1161 case CenterGravity:
1162 // these centered ones are a little more interesting
1163 x_offset = -(m_titlebar.height() + m_titlebar.borderWidth()
1164 + m_handle.height() + m_handle.borderWidth()) / 2;
1165 break;
1166 case StaticGravity:
1167 x_offset = -(m_titlebar.height() + m_titlebar.borderWidth());
1155 break; 1168 break;
1156 } 1169 }
1157 1170
@@ -1166,6 +1179,6 @@ void FbWinFrame::gravityTranslate(int &x, int &y, int win_gravity, bool move_fra
1166 y += y_offset; 1179 y += y_offset;
1167 1180
1168 if (move_frame && (x_offset != 0 || y_offset != 0)) { 1181 if (move_frame && (x_offset != 0 || y_offset != 0)) {
1169 move(x() + x_offset, y() + y_offset); 1182 move(m_window.x() + x_offset, m_window.y() + y_offset);
1170 } 1183 }
1171} 1184}