little hack for fixing _NET_WM_STATE_DEMANDS_ATTENTION with tabs
markt markt
3 files changed,
19 insertions(+),
7 deletions(-)
M
src/Ewmh.cc
→
src/Ewmh.cc
@@ -729,11 +729,11 @@ // ce.data.l[0] = the action (remove, add or toggle)
// ce.data.l[1] = the first property to alter // ce.data.l[2] = second property to alter (can be zero) if (ce.data.l[0] == STATE_REMOVE) { - setState(win, ce.data.l[1], false); - setState(win, ce.data.l[2], false); + setState(win, ce.data.l[1], false, *winclient); + setState(win, ce.data.l[2], false, *winclient); } else if (ce.data.l[0] == STATE_ADD) { - setState(win, ce.data.l[1], true); - setState(win, ce.data.l[2], true); + setState(win, ce.data.l[1], true, *winclient); + setState(win, ce.data.l[2], true, *winclient); } else if (ce.data.l[0] == STATE_TOGGLE) { toggleState(win, ce.data.l[1]); toggleState(win, ce.data.l[2]);@@ -1031,8 +1031,15 @@ m_net_wm_ping = XInternAtom(disp, "_NET_WM_PING", False);
utf8_string = XInternAtom(disp, "UTF8_STRING", False); } +// wrapper for avoiding changing every AtomHandler to include an unnecessary +// parameter, although we need it for _NET_WM_STATE_DEMANDS_ATTENTION +void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { + setState(win, state, value, win.winClient()); +} + // set window state -void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { +void Ewmh::setState(FluxboxWindow &win, Atom state, bool value, + WinClient &client) { if (state == m_net_wm_state_sticky) { // STICKY if (value && !win.isStuck() || (!value && win.isStuck()))@@ -1072,10 +1079,10 @@ else if (win.layerNum() < Layer::NORMAL)
win.moveToLayer(Layer::NORMAL); } else if (state == m_net_wm_state_demands_attention) { if (value) { // if add attention - Fluxbox::instance()->attentionHandler().addAttention(win.winClient()); + Fluxbox::instance()->attentionHandler().addAttention(client); } else { // erase it Fluxbox::instance()->attentionHandler(). - update(&win.winClient().focusSig()); + update(&client.focusSig()); } }
M
src/Ewmh.hh
→
src/Ewmh.hh
@@ -67,6 +67,8 @@
enum { STATE_REMOVE = 0, STATE_ADD = 1, STATE_TOGGLE = 2}; void setState(FluxboxWindow &win, Atom state, bool value); + void setState(FluxboxWindow &win, Atom state, bool value, + WinClient &client); void toggleState(FluxboxWindow &win, Atom state); void createAtoms(); void updateStrut(WinClient &winclient);