diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-06-26 10:09:28 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2016-06-26 14:35:26 (GMT) |
commit | 07d8fbfba806e10d8e57629b0ade029989c0b9d6 (patch) | |
tree | 001c34d0fea1f8e51b0515fc5c76db02f5c671f0 /src/Window.hh | |
parent | 1a61881ec34a5f3691df1159f63a4b5afb1f53c4 (diff) | |
download | fluxbox-07d8fbfba806e10d8e57629b0ade029989c0b9d6.zip fluxbox-07d8fbfba806e10d8e57629b0ade029989c0b9d6.tar.bz2 |
merge remember focusnew into focusprotection
The FocusNewWindow key is still read, but not written and OVERRIDDEN in
case of conflict with the FocusProtection key
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 |