diff options
Diffstat (limited to 'src/Window.hh')
-rw-r--r-- | src/Window.hh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Window.hh b/src/Window.hh index c04676a..706f8ed 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -56,6 +56,18 @@ class ImageControl; | |||
56 | class Layer; | 56 | class Layer; |
57 | } | 57 | } |
58 | 58 | ||
59 | namespace Focus { | ||
60 | enum { | ||
61 | NoProtection = 0, | ||
62 | Gain = 1, | ||
63 | Refuse = 2, | ||
64 | Lock = 4, | ||
65 | Deny = 8 | ||
66 | }; | ||
67 | typedef unsigned int Protection; | ||
68 | } | ||
69 | |||
70 | |||
59 | /// Creates the window frame and handles any window event for it | 71 | /// Creates the window frame and handles any window event for it |
60 | class FluxboxWindow: public Focusable, | 72 | class FluxboxWindow: public Focusable, |
61 | public FbTk::EventHandler, | 73 | public FbTk::EventHandler, |
@@ -256,6 +268,8 @@ public: | |||
256 | void setIconHidden(bool value); | 268 | void setIconHidden(bool value); |
257 | /// sets whether or not the window normally gets focus when mapped | 269 | /// sets whether or not the window normally gets focus when mapped |
258 | void setFocusNew(bool value) { m_focus_new = value; } | 270 | void setFocusNew(bool value) { m_focus_new = value; } |
271 | /// sets how to protect the focus on or against this window | ||
272 | void setFocusProtection(Focus::Protection value) { m_focus_protection = value; } | ||
259 | /// sets whether or not the window gets focused with mouse | 273 | /// sets whether or not the window gets focused with mouse |
260 | void setMouseFocus(bool value) { m_mouse_focus = value; } | 274 | void setMouseFocus(bool value) { m_mouse_focus = value; } |
261 | /// sets whether or not the window gets focused with click | 275 | /// sets whether or not the window gets focused with click |
@@ -384,6 +398,7 @@ public: | |||
384 | bool isMoveable() const { return functions.move; } | 398 | bool isMoveable() const { return functions.move; } |
385 | bool isStuck() const { return m_state.stuck; } | 399 | bool isStuck() const { return m_state.stuck; } |
386 | bool isFocusNew() const { return m_focus_new; } | 400 | bool isFocusNew() const { return m_focus_new; } |
401 | Focus::Protection focusProtection() const { return m_focus_protection; } | ||
387 | bool hasTitlebar() const { return decorations.titlebar; } | 402 | bool hasTitlebar() const { return decorations.titlebar; } |
388 | bool isMoving() const { return moving; } | 403 | bool isMoving() const { return moving; } |
389 | bool isResizing() const { return resizing; } | 404 | bool isResizing() const { return resizing; } |
@@ -572,6 +587,8 @@ private: | |||
572 | typedef FbTk::ConstObjectAccessor<bool, FocusControl> BoolAcc; | 587 | typedef FbTk::ConstObjectAccessor<bool, FocusControl> BoolAcc; |
573 | /// if the window is normally focused when mapped | 588 | /// if the window is normally focused when mapped |
574 | FbTk::DefaultValue<bool, BoolAcc> m_focus_new; | 589 | FbTk::DefaultValue<bool, BoolAcc> m_focus_new; |
590 | /// special focus permissions | ||
591 | Focus::Protection m_focus_protection; | ||
575 | /// if the window is focused with EnterNotify | 592 | /// if the window is focused with EnterNotify |
576 | FbTk::DefaultValue<bool, BoolAcc> m_mouse_focus; | 593 | FbTk::DefaultValue<bool, BoolAcc> m_mouse_focus; |
577 | bool m_click_focus; ///< if the window is focused by clicking | 594 | bool m_click_focus; ///< if the window is focused by clicking |