all repos — fluxbox @ 3aa4244ab8c6a4cbdd247ddcc3477cb8c38f64c0

custom fork of the fluxbox windowmanager

added support for urgency hint, thanks Mark Tiefenbruck
fluxgen fluxgen
commit

3aa4244ab8c6a4cbdd247ddcc3477cb8c38f64c0

parent

2fdc6ab808d3828cba1bacaff536d607dfa60c58

4 files changed, 20 insertions(+), 5 deletions(-)

jump to
M src/Ewmh.ccsrc/Ewmh.cc

@@ -1057,10 +1057,12 @@ win.moveToLayer(Layer::ABOVE_DOCK);

else win.moveToLayer(Layer::NORMAL); } else if (state == m_net_wm_state_demands_attention) { - if (value) // if add attention - m_demands_attention.addAttention(win); - else // erase it - m_demands_attention.update(&win.attentionSig()); + if (value) { // if add attention + Fluxbox::instance()->attentionHandler().addAttention(win); + } else { // erase it + Fluxbox::instance()->attentionHandler(). + update(&win.attentionSig()); + } } // Note: state == net_wm_state_modal, We should not change it
M src/Ewmh.hhsrc/Ewmh.hh

@@ -153,5 +153,4 @@ void clearState(FluxboxWindow &win);

void saveState(FluxboxWindow &win, WindowState *state); FbTk::FbString getUTF8Property(Atom property); - AttentionNoticeHandler m_demands_attention; };
M src/WinClient.ccsrc/WinClient.cc

@@ -514,6 +514,15 @@ m_icon_mask.copy(wmhint->icon_mask, 0, 0);

else m_icon_mask = 0; + if (m_win && m_win->isInitialized()) { + if (wmhint->flags & XUrgencyHint) { + Fluxbox::instance()->attentionHandler().addAttention(*m_win); + } else { + Fluxbox::instance()->attentionHandler(). + update(&(m_win->attentionSig())); + } + } + XFree(wmhint); } }
M src/fluxbox.hhsrc/fluxbox.hh

@@ -32,6 +32,7 @@ #include "FbTk/Resource.hh"

#include "FbTk/Timer.hh" #include "FbTk/Observer.hh" #include "FbTk/SignalHandler.hh" +#include "AttentionNoticeHandler.hh" #include <X11/Xlib.h> #include <X11/Xresource.h>

@@ -207,6 +208,8 @@ BScreen *keyScreen() { return m_keyscreen; }

// screen we are watching for modifier changes BScreen *watchingScreen() { return m_watching_screen; } const XEvent &lastEvent() const { return m_last_event; } + + AttentionNoticeHandler &attentionHandler() { return m_attention_handler; } private:

@@ -314,6 +317,8 @@ bool m_have_shape; ///< if shape is supported by server

const char *m_RC_PATH; const char *m_RC_INIT_FILE; Atom m_kwm1_dockwindow, m_kwm2_dockwindow; + + AttentionNoticeHandler m_attention_handler; };