aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2007-06-30 01:28:54 (GMT)
committermarkt <markt>2007-06-30 01:28:54 (GMT)
commit8fbeaf279e930b2d9c236cba29b923609b910f5c (patch)
tree68249f76f4032580a67a97b4175b0d4a28aa8398 /src
parent329fca30fdbbc051a733c6d15efa6b95370ac221 (diff)
downloadfluxbox_pavel-8fbeaf279e930b2d9c236cba29b923609b910f5c.zip
fluxbox_pavel-8fbeaf279e930b2d9c236cba29b923609b910f5c.tar.bz2
little hack for fixing _NET_WM_STATE_DEMANDS_ATTENTION with tabs
Diffstat (limited to 'src')
-rw-r--r--src/Ewmh.cc21
-rw-r--r--src/Ewmh.hh2
2 files changed, 16 insertions, 7 deletions
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
1035void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { 1036void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) {
1037 setState(win, state, value, win.winClient());
1038}
1039
1040// set window state
1041void 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);