diff options
Diffstat (limited to 'src/Window.hh')
-rw-r--r-- | src/Window.hh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Window.hh b/src/Window.hh index 706f8ed..4235106 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -267,7 +267,12 @@ public: | |||
267 | /// sets the window icon hidden state | 267 | /// sets the window icon hidden state |
268 | void setIconHidden(bool value); | 268 | void setIconHidden(bool value); |
269 | /// sets whether or not the window normally gets focus when mapped | 269 | /// sets whether or not the window normally gets focus when mapped |
270 | void setFocusNew(bool value) { m_focus_new = value; } | 270 | void setFocusNew(bool value) { |
271 | if (value) | ||
272 | m_focus_protection = (m_focus_protection & ~Focus::Refuse) | Focus::Gain; | ||
273 | else | ||
274 | m_focus_protection = (m_focus_protection & ~Focus::Gain) | Focus::Refuse; | ||
275 | } | ||
271 | /// sets how to protect the focus on or against this window | 276 | /// sets how to protect the focus on or against this window |
272 | void setFocusProtection(Focus::Protection value) { m_focus_protection = value; } | 277 | void setFocusProtection(Focus::Protection value) { m_focus_protection = value; } |
273 | /// sets whether or not the window gets focused with mouse | 278 | /// sets whether or not the window gets focused with mouse |
@@ -397,7 +402,7 @@ public: | |||
397 | bool isClosable() const { return functions.close; } | 402 | bool isClosable() const { return functions.close; } |
398 | bool isMoveable() const { return functions.move; } | 403 | bool isMoveable() const { return functions.move; } |
399 | bool isStuck() const { return m_state.stuck; } | 404 | bool isStuck() const { return m_state.stuck; } |
400 | bool isFocusNew() const { return m_focus_new; } | 405 | bool isFocusNew() const; |
401 | Focus::Protection focusProtection() const { return m_focus_protection; } | 406 | Focus::Protection focusProtection() const { return m_focus_protection; } |
402 | bool hasTitlebar() const { return decorations.titlebar; } | 407 | bool hasTitlebar() const { return decorations.titlebar; } |
403 | bool isMoving() const { return moving; } | 408 | bool isMoving() const { return moving; } |
@@ -586,7 +591,6 @@ private: | |||
586 | 591 | ||
587 | typedef FbTk::ConstObjectAccessor<bool, FocusControl> BoolAcc; | 592 | typedef FbTk::ConstObjectAccessor<bool, FocusControl> BoolAcc; |
588 | /// if the window is normally focused when mapped | 593 | /// if the window is normally focused when mapped |
589 | FbTk::DefaultValue<bool, BoolAcc> m_focus_new; | ||
590 | /// special focus permissions | 594 | /// special focus permissions |
591 | Focus::Protection m_focus_protection; | 595 | Focus::Protection m_focus_protection; |
592 | /// if the window is focused with EnterNotify | 596 | /// if the window is focused with EnterNotify |