all repos — fluxbox @ 8fbeaf279e930b2d9c236cba29b923609b910f5c

custom fork of the fluxbox windowmanager

little hack for fixing _NET_WM_STATE_DEMANDS_ATTENTION with tabs
markt markt
commit

8fbeaf279e930b2d9c236cba29b923609b910f5c

parent

329fca30fdbbc051a733c6d15efa6b95370ac221

3 files changed, 19 insertions(+), 7 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0.0: +*07/06/30: + * Fix _NET_WM_STATE_DEMANDS_ATTENTION with tabbed windows, #1732392 (Mark) + Ewmh.cc/hh *07/06/29: * Updates for compiling with gcc 4.3 (thanks Dmitry E. Oboukhov) *07/06/28:
M src/Ewmh.ccsrc/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.hhsrc/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);