aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-16 07:22:12 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-16 07:22:12 (GMT)
commitfe412dbeef7af324a376cba338bff8c24e032d2e (patch)
treeeab03ffc2e6b94e70d78c29ae3384b2c265e7a18 /src/FbWinFrame.hh
parent1d8dfcdf9ad5405f4eef18dc009ce8cfe6d27f29 (diff)
downloadfluxbox-fe412dbeef7af324a376cba338bff8c24e032d2e.zip
fluxbox-fe412dbeef7af324a376cba338bff8c24e032d2e.tar.bz2
move interpretation of normal hints to size hint class
Diffstat (limited to 'src/FbWinFrame.hh')
-rw-r--r--src/FbWinFrame.hh12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh
index 5c93727..85f0c21 100644
--- a/src/FbWinFrame.hh
+++ b/src/FbWinFrame.hh
@@ -33,6 +33,8 @@
33#include "FbTk/Container.hh" 33#include "FbTk/Container.hh"
34#include "FbTk/Shape.hh" 34#include "FbTk/Shape.hh"
35 35
36#include <X11/Xutil.h>
37
36#include <vector> 38#include <vector>
37#include <memory> 39#include <memory>
38 40
@@ -101,7 +103,10 @@ public:
101 min_width(1), max_width(0), min_height(1), max_height(0), 103 min_width(1), max_width(0), min_height(1), max_height(0),
102 width_inc(1), height_inc(1), base_width(0), base_height(0), 104 width_inc(1), height_inc(1), base_width(0), base_height(0),
103 min_aspect_x(0), max_aspect_x(0), 105 min_aspect_x(0), max_aspect_x(0),
104 min_aspect_y(0), max_aspect_y(0) { } 106 min_aspect_y(0), max_aspect_y(0),
107 win_gravity(0) { }
108
109 void reset(const XSizeHints &sizehint);
105 110
106 void apply(unsigned int &w, unsigned int &h, 111 void apply(unsigned int &w, unsigned int &h,
107 bool maximizing = false) const; 112 bool maximizing = false) const;
@@ -112,6 +117,7 @@ public:
112 unsigned int min_width, max_width, min_height, max_height, 117 unsigned int min_width, max_width, min_height, max_height,
113 width_inc, height_inc, base_width, base_height, 118 width_inc, height_inc, base_width, base_height,
114 min_aspect_x, max_aspect_x, min_aspect_y, max_aspect_y; 119 min_aspect_x, max_aspect_x, min_aspect_y, max_aspect_y;
120 int win_gravity;
115 }; 121 };
116 122
117 class State { 123 class State {
@@ -241,7 +247,7 @@ public:
241 // this function translates its arguments according to win_gravity 247 // this function translates its arguments according to win_gravity
242 // if win_gravity is negative, it does an inverse translation 248 // if win_gravity is negative, it does an inverse translation
243 void gravityTranslate(int &x, int &y, int win_gravity, unsigned int client_bw, bool move_frame = false); 249 void gravityTranslate(int &x, int &y, int win_gravity, unsigned int client_bw, bool move_frame = false);
244 void setActiveGravity(int gravity, unsigned int orig_client_bw) { m_active_gravity = gravity; m_active_orig_client_bw = orig_client_bw; } 250 void setActiveGravity(int gravity, unsigned int orig_client_bw) { m_state.size_hints.win_gravity = gravity; m_active_orig_client_bw = orig_client_bw; }
245 251
246 /** 252 /**
247 @name Event handlers 253 @name Event handlers
@@ -437,8 +443,6 @@ private:
437 443
438 TabMode m_tabmode; 444 TabMode m_tabmode;
439 445
440 // last gravity that this window was *actively* placed with
441 int m_active_gravity;
442 unsigned int m_active_orig_client_bw; 446 unsigned int m_active_orig_client_bw;
443 State m_state; 447 State m_state;
444 448