aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2006-06-11 12:47:47 (GMT)
committerfluxgen <fluxgen>2006-06-11 12:47:47 (GMT)
commit3aa4244ab8c6a4cbdd247ddcc3477cb8c38f64c0 (patch)
tree3ca6fdbc6814c827d7952a01cf9a7a065bfec2c3
parent2fdc6ab808d3828cba1bacaff536d607dfa60c58 (diff)
downloadfluxbox_paul-3aa4244ab8c6a4cbdd247ddcc3477cb8c38f64c0.zip
fluxbox_paul-3aa4244ab8c6a4cbdd247ddcc3477cb8c38f64c0.tar.bz2
added support for urgency hint, thanks Mark Tiefenbruck
-rw-r--r--src/Ewmh.cc10
-rw-r--r--src/Ewmh.hh1
-rw-r--r--src/WinClient.cc9
-rw-r--r--src/fluxbox.hh5
4 files changed, 20 insertions, 5 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index cf1cbbe..e034aa9 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -1057,10 +1057,12 @@ void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) {
1057 else 1057 else
1058 win.moveToLayer(Layer::NORMAL); 1058 win.moveToLayer(Layer::NORMAL);
1059 } else if (state == m_net_wm_state_demands_attention) { 1059 } else if (state == m_net_wm_state_demands_attention) {
1060 if (value) // if add attention 1060 if (value) { // if add attention
1061 m_demands_attention.addAttention(win); 1061 Fluxbox::instance()->attentionHandler().addAttention(win);
1062 else // erase it 1062 } else { // erase it
1063 m_demands_attention.update(&win.attentionSig()); 1063 Fluxbox::instance()->attentionHandler().
1064 update(&win.attentionSig());
1065 }
1064 } 1066 }
1065 1067
1066 // Note: state == net_wm_state_modal, We should not change it 1068 // Note: state == net_wm_state_modal, We should not change it
diff --git a/src/Ewmh.hh b/src/Ewmh.hh
index 4882ed5..6044f7c 100644
--- a/src/Ewmh.hh
+++ b/src/Ewmh.hh
@@ -153,5 +153,4 @@ private:
153 void saveState(FluxboxWindow &win, WindowState *state); 153 void saveState(FluxboxWindow &win, WindowState *state);
154 154
155 FbTk::FbString getUTF8Property(Atom property); 155 FbTk::FbString getUTF8Property(Atom property);
156 AttentionNoticeHandler m_demands_attention;
157}; 156};
diff --git a/src/WinClient.cc b/src/WinClient.cc
index 82027da..acb8250 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -514,6 +514,15 @@ void WinClient::updateWMHints() {
514 else 514 else
515 m_icon_mask = 0; 515 m_icon_mask = 0;
516 516
517 if (m_win && m_win->isInitialized()) {
518 if (wmhint->flags & XUrgencyHint) {
519 Fluxbox::instance()->attentionHandler().addAttention(*m_win);
520 } else {
521 Fluxbox::instance()->attentionHandler().
522 update(&(m_win->attentionSig()));
523 }
524 }
525
517 XFree(wmhint); 526 XFree(wmhint);
518 } 527 }
519} 528}
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index 7506dc6..c3936c7 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -32,6 +32,7 @@
32#include "FbTk/Timer.hh" 32#include "FbTk/Timer.hh"
33#include "FbTk/Observer.hh" 33#include "FbTk/Observer.hh"
34#include "FbTk/SignalHandler.hh" 34#include "FbTk/SignalHandler.hh"
35#include "AttentionNoticeHandler.hh"
35 36
36#include <X11/Xlib.h> 37#include <X11/Xlib.h>
37#include <X11/Xresource.h> 38#include <X11/Xresource.h>
@@ -207,6 +208,8 @@ public:
207 // screen we are watching for modifier changes 208 // screen we are watching for modifier changes
208 BScreen *watchingScreen() { return m_watching_screen; } 209 BScreen *watchingScreen() { return m_watching_screen; }
209 const XEvent &lastEvent() const { return m_last_event; } 210 const XEvent &lastEvent() const { return m_last_event; }
211
212 AttentionNoticeHandler &attentionHandler() { return m_attention_handler; }
210 213
211private: 214private:
212 215
@@ -314,6 +317,8 @@ private:
314 const char *m_RC_PATH; 317 const char *m_RC_PATH;
315 const char *m_RC_INIT_FILE; 318 const char *m_RC_INIT_FILE;
316 Atom m_kwm1_dockwindow, m_kwm2_dockwindow; 319 Atom m_kwm1_dockwindow, m_kwm2_dockwindow;
320
321 AttentionNoticeHandler m_attention_handler;
317}; 322};
318 323
319 324