aboutsummaryrefslogtreecommitdiff
path: root/src/Window.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-06-23 14:16:05 (GMT)
committerrathnor <rathnor>2003-06-23 14:16:05 (GMT)
commit09a5c23c5b099af531842ae7868e98bc8d717dac (patch)
treecf5ea34c09ee3d16ddc2e9abfc1bd2880a94067d /src/Window.hh
parent2e6baffb9bf988901f9fa02f651efc9b2528d7b5 (diff)
downloadfluxbox-09a5c23c5b099af531842ae7868e98bc8d717dac.zip
fluxbox-09a5c23c5b099af531842ae7868e98bc8d717dac.tar.bz2
fix grouping to persist over restart, plus various related bugs.
Also move a large proportion of window initialisation from FluxboxWindow to WinClient
Diffstat (limited to 'src/Window.hh')
-rw-r--r--src/Window.hh35
1 files changed, 12 insertions, 23 deletions
diff --git a/src/Window.hh b/src/Window.hh
index 59a9084..1ffdb82 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.hh,v 1.79 2003/06/18 13:55:16 fluxgen Exp $ 25// $Id: Window.hh,v 1.80 2003/06/23 14:16:05 rathnor Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -103,10 +103,6 @@ public:
103 ATTRIB_DECORATION = 0x40 103 ATTRIB_DECORATION = 0x40
104 }; 104 };
105 105
106 static const int PropBlackboxHintsElements = 5;
107 static const int PropBlackboxAttributesElements = 8;
108 static const int PropMwmHintsElements = 3;
109
110 typedef struct _blackbox_hints { 106 typedef struct _blackbox_hints {
111 unsigned long flags, attrib, workspace, stack; 107 unsigned long flags, attrib, workspace, stack;
112 int decoration; 108 int decoration;
@@ -126,11 +122,6 @@ public:
126 FbTk::MenuTheme &menutheme, 122 FbTk::MenuTheme &menutheme,
127 FbTk::XLayer &layer); 123 FbTk::XLayer &layer);
128 124
129 /// create fluxbox window with parent win and screen connection
130 FluxboxWindow(Window win, BScreen &scr,
131 FbWinFrameTheme &tm,
132 FbTk::MenuTheme &menutheme,
133 FbTk::XLayer &layer);
134 virtual ~FluxboxWindow(); 125 virtual ~FluxboxWindow();
135 126
136 /// attach client to our client list and remove it from old window 127 /// attach client to our client list and remove it from old window
@@ -148,7 +139,7 @@ public:
148 void prevClient(); 139 void prevClient();
149 140
150 void setWindowNumber(int n) { m_window_number = n; } 141 void setWindowNumber(int n) { m_window_number = n; }
151 142
152 bool validateClient(); 143 bool validateClient();
153 bool setInputFocus(); 144 bool setInputFocus();
154 void raiseAndFocus() { raise(); setInputFocus(); } 145 void raiseAndFocus() { raise(); setInputFocus(); }
@@ -222,7 +213,7 @@ public:
222 void setDecoration(Decoration decoration); 213 void setDecoration(Decoration decoration);
223 void applyDecorations(); 214 void applyDecorations();
224 void toggleDecoration(); 215 void toggleDecoration();
225 216
226 /** 217 /**
227 This enumeration represents individual decoration 218 This enumeration represents individual decoration
228 attributes, they can be OR-d together to get a mask. 219 attributes, they can be OR-d together to get a mask.
@@ -334,7 +325,7 @@ public:
334 const timeval &lastFocusTime() const { return m_last_focus_time;} 325 const timeval &lastFocusTime() const { return m_last_focus_time;}
335 326
336 //@} 327 //@}
337 328
338 class WinSubject: public FbTk::Subject { 329 class WinSubject: public FbTk::Subject {
339 public: 330 public:
340 WinSubject(FluxboxWindow &w):m_win(w) { } 331 WinSubject(FluxboxWindow &w):m_win(w) { }
@@ -348,6 +339,8 @@ public:
348 // during certain operations 339 // during certain operations
349 340
350private: 341private:
342 static const int PropBlackboxAttributesElements = 8;
343
351 void init(); 344 void init();
352 /// applies a shape mask to the window if it has one 345 /// applies a shape mask to the window if it has one
353 void shape(); 346 void shape();
@@ -367,15 +360,13 @@ private:
367 void updateTitleFromClient(); 360 void updateTitleFromClient();
368 /// gets icon name from client window 361 /// gets icon name from client window
369 void updateIconNameFromClient(); 362 void updateIconNameFromClient();
370 void getWMNormalHints();
371 void getWMProtocols(); 363 void getWMProtocols();
372 void getWMHints();
373 void getMWMHints(); 364 void getMWMHints();
374 void getBlackboxHints(); 365 void getBlackboxHints();
375 void saveBlackboxHints(); 366 void saveBlackboxAttribs();
376 void setNetWMAttributes(); 367 void setNetWMAttributes();
377 void associateClientWindow(); 368 void associateClientWindow();
378 369
379 void restoreGravity(); 370 void restoreGravity();
380 void setGravityOffsets(); 371 void setGravityOffsets();
381 void setState(unsigned long stateval); 372 void setState(unsigned long stateval);
@@ -394,7 +385,7 @@ private:
394 385
395 // Window states 386 // Window states
396 bool moving, resizing, shaded, maximized, iconic, 387 bool moving, resizing, shaded, maximized, iconic,
397 focused, stuck, send_focus_message, m_managed; 388 focused, stuck, m_managed;
398 389
399 WinClient *m_attaching_tab; 390 WinClient *m_attaching_tab;
400 391
@@ -406,15 +397,15 @@ private:
406 std::auto_ptr<FbTk::Menu> m_layermenu; 397 std::auto_ptr<FbTk::Menu> m_layermenu;
407 FbTk::Menu m_windowmenu; 398 FbTk::Menu m_windowmenu;
408 399
409 400
410 timeval m_last_focus_time; 401 timeval m_last_focus_time;
411 402
412 int m_button_grab_x, m_button_grab_y; // handles last button press event for move 403 int m_button_grab_x, m_button_grab_y; // handles last button press event for move
413 int m_last_resize_x, m_last_resize_y; // handles last button press event for resize 404 int m_last_resize_x, m_last_resize_y; // handles last button press event for resize
414 int m_last_move_x, m_last_move_y; // handles last pos for non opaque moving 405 int m_last_move_x, m_last_move_y; // handles last pos for non opaque moving
415 unsigned int m_last_resize_h, m_last_resize_w; // handles height/width for resize "window" 406 unsigned int m_last_resize_h, m_last_resize_w; // handles height/width for resize "window"
416 407
417 int m_focus_mode, m_window_number; 408 int m_window_number;
418 unsigned int m_workspace_number; 409 unsigned int m_workspace_number;
419 unsigned long m_current_state; 410 unsigned long m_current_state;
420 411
@@ -452,8 +443,6 @@ private:
452 443
453 FbTk::FbWindow &m_parent; ///< window on which we draw move/resize rectangle (the "root window") 444 FbTk::FbWindow &m_parent; ///< window on which we draw move/resize rectangle (the "root window")
454 445
455 enum { F_NOINPUT = 0, F_PASSIVE, F_LOCALLYACTIVE, F_GLOBALLYACTIVE };
456
457}; 446};
458 447
459 448