aboutsummaryrefslogtreecommitdiff
path: root/src/Window.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-02-02 16:32:41 (GMT)
committerrathnor <rathnor>2003-02-02 16:32:41 (GMT)
commit1b063dcea92e0a7ac5008518fc5c13f03c055f54 (patch)
tree29d5b622c0870f06a94086ed463ab90e23bc673e /src/Window.hh
parent5244fc32447d2649a52a06dc84d96da94e9fd715 (diff)
downloadfluxbox_pavel-1b063dcea92e0a7ac5008518fc5c13f03c055f54.zip
fluxbox_pavel-1b063dcea92e0a7ac5008518fc5c13f03c055f54.tar.bz2
Integration of new Layering code, plus updates to the layering code itself
- new KeyActions: Raise/LowerLayer, AlwaysOnTop/Bottom, Top/BottomLayer Added a "Quit" KeyAction
Diffstat (limited to 'src/Window.hh')
-rw-r--r--src/Window.hh28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/Window.hh b/src/Window.hh
index 2d77ef3..27bb7dd 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.42 2003/01/09 22:16:40 fluxgen Exp $ 25// $Id: Window.hh,v 1.43 2003/02/02 16:32:40 rathnor Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -33,6 +33,7 @@
33#include "Subject.hh" 33#include "Subject.hh"
34#include "FbWinFrame.hh" 34#include "FbWinFrame.hh"
35#include "EventHandler.hh" 35#include "EventHandler.hh"
36#include "XLayerItem.hh"
36 37
37#include <X11/Xlib.h> 38#include <X11/Xlib.h>
38#include <X11/Xutil.h> 39#include <X11/Xutil.h>
@@ -59,14 +60,6 @@ class ImageControl;
59/// Creates the window frame and handles any window event for it 60/// Creates the window frame and handles any window event for it
60class FluxboxWindow : public FbTk::TimeoutHandler, public FbTk::EventHandler { 61class FluxboxWindow : public FbTk::TimeoutHandler, public FbTk::EventHandler {
61public: 62public:
62 /// layer bits
63 enum WinLayer {
64 LAYER_BOTTOM = 0x01, ///< bottom layer
65 LAYER_BELOW = 0x02, ///< below normal layer but above bottom
66 LAYER_NORMAL = 0x04, ///< normal layer
67 LAYER_TOP = 0x08 ///< top layer
68 };
69
70 /// decoration bit 63 /// decoration bit
71 enum Decoration { 64 enum Decoration {
72 DECOR_NONE=0, ///< no decor at all 65 DECOR_NONE=0, ///< no decor at all
@@ -145,7 +138,7 @@ public:
145 138
146 void setWorkspace(int n); 139 void setWorkspace(int n);
147 void changeBlackboxHints(const BaseDisplay::BlackboxHints &bh); 140 void changeBlackboxHints(const BaseDisplay::BlackboxHints &bh);
148 void restoreAttributes(); 141 void restoreAttributes(bool place_window);
149 void showMenu(int mx, int my); 142 void showMenu(int mx, int my);
150 // popup menu on last button press position 143 // popup menu on last button press position
151 void popupMenu(); 144 void popupMenu();
@@ -204,6 +197,9 @@ public:
204 const BScreen *getScreen() const { return screen; } 197 const BScreen *getScreen() const { return screen; }
205 BScreen *getScreen() { return screen; } 198 BScreen *getScreen() { return screen; }
206 199
200 const FbTk::XLayerItem *getLayerItem() const { return m_layeritem; }
201 FbTk::XLayerItem *getLayerItem() { return m_layeritem; }
202
207 const Tab *getTab() const { return tab; } 203 const Tab *getTab() const { return tab; }
208 Tab *getTab() { return tab; } 204 Tab *getTab() { return tab; }
209 205
@@ -227,7 +223,8 @@ public:
227 int getYClient() const { return client.y; } 223 int getYClient() const { return client.y; }
228 unsigned int getWorkspaceNumber() const { return workspace_number; } 224 unsigned int getWorkspaceNumber() const { return workspace_number; }
229 int getWindowNumber() const { return window_number; } 225 int getWindowNumber() const { return window_number; }
230 WinLayer getLayer() const { return m_layer; } 226 int getLayerNum() const { return m_layernum; }
227 void setLayerNum(int layernum);
231 unsigned int getWidth() const { return m_frame.width(); } 228 unsigned int getWidth() const { return m_frame.width(); }
232 unsigned int getHeight() const { return m_frame.height(); } 229 unsigned int getHeight() const { return m_frame.height(); }
233 unsigned int getClientHeight() const { return client.height; } 230 unsigned int getClientHeight() const { return client.height; }
@@ -247,6 +244,8 @@ public:
247 */ 244 */
248 FbTk::Subject &stateSig() { return m_statesig; } 245 FbTk::Subject &stateSig() { return m_statesig; }
249 const FbTk::Subject &stateSig() const { return m_statesig; } 246 const FbTk::Subject &stateSig() const { return m_statesig; }
247 FbTk::Subject &layerSig() { return m_layersig; }
248 const FbTk::Subject &layerSig() const { return m_layersig; }
250 FbTk::Subject &hintSig() { return m_hintsig; } 249 FbTk::Subject &hintSig() { return m_hintsig; }
251 const FbTk::Subject &hintSig() const { return m_hintsig; } 250 const FbTk::Subject &hintSig() const { return m_hintsig; }
252 FbTk::Subject &workspaceSig() { return m_workspacesig; } 251 FbTk::Subject &workspaceSig() { return m_workspacesig; }
@@ -297,6 +296,7 @@ private:
297 void getWMHints(); 296 void getWMHints();
298 void getMWMHints(); 297 void getMWMHints();
299 void getBlackboxHints(); 298 void getBlackboxHints();
299 void saveBlackboxHints();
300 void setNetWMAttributes(); 300 void setNetWMAttributes();
301 void associateClientWindow(); 301 void associateClientWindow();
302 void createWinButtons(); 302 void createWinButtons();
@@ -312,7 +312,7 @@ private:
312 void left_fixsize(int *x = 0, int *y = 0); 312 void left_fixsize(int *x = 0, int *y = 0);
313 313
314 // state and hint signals 314 // state and hint signals
315 WinSubject m_hintsig, m_statesig, m_workspacesig, m_diesig; 315 WinSubject m_hintsig, m_statesig, m_layersig, m_workspacesig, m_diesig;
316 316
317 std::string m_instance_name; /// instance name from WM_CLASS 317 std::string m_instance_name; /// instance name from WM_CLASS
318 std::string m_class_name; /// class name from WM_CLASS 318 std::string m_class_name; /// class name from WM_CLASS
@@ -328,6 +328,8 @@ private:
328 328
329 Time lastButtonPressTime; 329 Time lastButtonPressTime;
330 FbTk::Menu m_windowmenu; 330 FbTk::Menu m_windowmenu;
331 FbTk::XLayerItem *m_layeritem;
332 int m_layernum;
331 333
332 timeval lastFocusTime; 334 timeval lastFocusTime;
333 335
@@ -338,7 +340,7 @@ private:
338 int focus_mode, window_number; 340 int focus_mode, window_number;
339 unsigned int workspace_number; 341 unsigned int workspace_number;
340 unsigned long current_state; 342 unsigned long current_state;
341 WinLayer m_layer; 343
342 Decoration old_decoration; 344 Decoration old_decoration;
343 345
344 struct _client { 346 struct _client {