diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/Ewmh.cc | 21 | ||||
-rw-r--r-- | src/Ewmh.hh | 2 |
3 files changed, 19 insertions, 7 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0.0: | 2 | Changes for 1.0.0: |
3 | *07/06/30: | ||
4 | * Fix _NET_WM_STATE_DEMANDS_ATTENTION with tabbed windows, #1732392 (Mark) | ||
5 | Ewmh.cc/hh | ||
3 | *07/06/29: | 6 | *07/06/29: |
4 | * Updates for compiling with gcc 4.3 (thanks Dmitry E. Oboukhov) | 7 | * Updates for compiling with gcc 4.3 (thanks Dmitry E. Oboukhov) |
5 | *07/06/28: | 8 | *07/06/28: |
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 945c7b6..b4e831d 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -729,11 +729,11 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, | |||
729 | // ce.data.l[1] = the first property to alter | 729 | // ce.data.l[1] = the first property to alter |
730 | // ce.data.l[2] = second property to alter (can be zero) | 730 | // ce.data.l[2] = second property to alter (can be zero) |
731 | if (ce.data.l[0] == STATE_REMOVE) { | 731 | if (ce.data.l[0] == STATE_REMOVE) { |
732 | setState(win, ce.data.l[1], false); | 732 | setState(win, ce.data.l[1], false, *winclient); |
733 | setState(win, ce.data.l[2], false); | 733 | setState(win, ce.data.l[2], false, *winclient); |
734 | } else if (ce.data.l[0] == STATE_ADD) { | 734 | } else if (ce.data.l[0] == STATE_ADD) { |
735 | setState(win, ce.data.l[1], true); | 735 | setState(win, ce.data.l[1], true, *winclient); |
736 | setState(win, ce.data.l[2], true); | 736 | setState(win, ce.data.l[2], true, *winclient); |
737 | } else if (ce.data.l[0] == STATE_TOGGLE) { | 737 | } else if (ce.data.l[0] == STATE_TOGGLE) { |
738 | toggleState(win, ce.data.l[1]); | 738 | toggleState(win, ce.data.l[1]); |
739 | toggleState(win, ce.data.l[2]); | 739 | toggleState(win, ce.data.l[2]); |
@@ -1031,8 +1031,15 @@ void Ewmh::createAtoms() { | |||
1031 | utf8_string = XInternAtom(disp, "UTF8_STRING", False); | 1031 | utf8_string = XInternAtom(disp, "UTF8_STRING", False); |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | // set window state | 1034 | // wrapper for avoiding changing every AtomHandler to include an unnecessary |
1035 | // parameter, although we need it for _NET_WM_STATE_DEMANDS_ATTENTION | ||
1035 | void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { | 1036 | void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { |
1037 | setState(win, state, value, win.winClient()); | ||
1038 | } | ||
1039 | |||
1040 | // set window state | ||
1041 | void Ewmh::setState(FluxboxWindow &win, Atom state, bool value, | ||
1042 | WinClient &client) { | ||
1036 | if (state == m_net_wm_state_sticky) { // STICKY | 1043 | if (state == m_net_wm_state_sticky) { // STICKY |
1037 | if (value && !win.isStuck() || | 1044 | if (value && !win.isStuck() || |
1038 | (!value && win.isStuck())) | 1045 | (!value && win.isStuck())) |
@@ -1072,10 +1079,10 @@ void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { | |||
1072 | win.moveToLayer(Layer::NORMAL); | 1079 | win.moveToLayer(Layer::NORMAL); |
1073 | } else if (state == m_net_wm_state_demands_attention) { | 1080 | } else if (state == m_net_wm_state_demands_attention) { |
1074 | if (value) { // if add attention | 1081 | if (value) { // if add attention |
1075 | Fluxbox::instance()->attentionHandler().addAttention(win.winClient()); | 1082 | Fluxbox::instance()->attentionHandler().addAttention(client); |
1076 | } else { // erase it | 1083 | } else { // erase it |
1077 | Fluxbox::instance()->attentionHandler(). | 1084 | Fluxbox::instance()->attentionHandler(). |
1078 | update(&win.winClient().focusSig()); | 1085 | update(&client.focusSig()); |
1079 | } | 1086 | } |
1080 | } | 1087 | } |
1081 | 1088 | ||
diff --git a/src/Ewmh.hh b/src/Ewmh.hh index f917390..c1a6868 100644 --- a/src/Ewmh.hh +++ b/src/Ewmh.hh | |||
@@ -67,6 +67,8 @@ private: | |||
67 | enum { STATE_REMOVE = 0, STATE_ADD = 1, STATE_TOGGLE = 2}; | 67 | enum { STATE_REMOVE = 0, STATE_ADD = 1, STATE_TOGGLE = 2}; |
68 | 68 | ||
69 | void setState(FluxboxWindow &win, Atom state, bool value); | 69 | void setState(FluxboxWindow &win, Atom state, bool value); |
70 | void setState(FluxboxWindow &win, Atom state, bool value, | ||
71 | WinClient &client); | ||
70 | void toggleState(FluxboxWindow &win, Atom state); | 72 | void toggleState(FluxboxWindow &win, Atom state); |
71 | void createAtoms(); | 73 | void createAtoms(); |
72 | void updateStrut(WinClient &winclient); | 74 | void updateStrut(WinClient &winclient); |