diff options
author | fluxgen <fluxgen> | 2006-05-13 16:20:00 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2006-05-13 16:20:00 (GMT) |
commit | 8776e3ca570b530c44a46976c50b8f9b1625778a (patch) | |
tree | 13034e8ca7120c7cbe900d86f5126a181edd40df /src | |
parent | e668b693fca5dbfd531be0510708c3a786cffb4d (diff) | |
download | fluxbox_lack-8776e3ca570b530c44a46976c50b8f9b1625778a.zip fluxbox_lack-8776e3ca570b530c44a46976c50b8f9b1625778a.tar.bz2 |
added support for _NET_WM_STATE_DEMANDS_ATTENTION
Diffstat (limited to 'src')
-rw-r--r-- | src/Ewmh.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index d4cfb3f..cf1cbbe 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -133,12 +133,14 @@ void Ewmh::initForScreen(BScreen &screen) { | |||
133 | m_net_wm_state_modal, | 133 | m_net_wm_state_modal, |
134 | m_net_wm_state_below, | 134 | m_net_wm_state_below, |
135 | m_net_wm_state_above, | 135 | m_net_wm_state_above, |
136 | m_net_wm_state_demands_attention, | ||
136 | 137 | ||
137 | // window type | 138 | // window type |
138 | m_net_wm_window_type, | 139 | m_net_wm_window_type, |
139 | m_net_wm_window_type_dock, | 140 | m_net_wm_window_type_dock, |
140 | m_net_wm_window_type_desktop, | 141 | m_net_wm_window_type_desktop, |
141 | m_net_wm_window_type_splash, | 142 | m_net_wm_window_type_splash, |
143 | m_net_wm_window_type_normal, | ||
142 | 144 | ||
143 | // window actions | 145 | // window actions |
144 | m_net_wm_allowed_actions, | 146 | m_net_wm_allowed_actions, |
@@ -283,11 +285,13 @@ void Ewmh::setupFrame(FluxboxWindow &win) { | |||
283 | */ | 285 | */ |
284 | win.setDecoration(FluxboxWindow::DECOR_NONE); | 286 | win.setDecoration(FluxboxWindow::DECOR_NONE); |
285 | win.setMovable(false); | 287 | win.setMovable(false); |
288 | } else if (atoms[l] == m_net_wm_window_type_normal) { | ||
289 | // do nothing, this is ..normal.. | ||
286 | } | 290 | } |
287 | 291 | ||
288 | } | 292 | } |
289 | XFree(data); | 293 | XFree(data); |
290 | } | 294 | } |
291 | 295 | ||
292 | setupState(win); | 296 | setupState(win); |
293 | 297 | ||
@@ -938,6 +942,7 @@ void Ewmh::createAtoms() { | |||
938 | m_net_wm_window_type_dock = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_DOCK", False); | 942 | m_net_wm_window_type_dock = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_DOCK", False); |
939 | m_net_wm_window_type_desktop = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_DESKTOP", False); | 943 | m_net_wm_window_type_desktop = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_DESKTOP", False); |
940 | m_net_wm_window_type_splash = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_SPLASH", False); | 944 | m_net_wm_window_type_splash = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_SPLASH", False); |
945 | m_net_wm_window_type_normal = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_NORMAL", False); | ||
941 | 946 | ||
942 | // state atom and the supported state atoms | 947 | // state atom and the supported state atoms |
943 | m_net_wm_state = XInternAtom(disp, "_NET_WM_STATE", False); | 948 | m_net_wm_state = XInternAtom(disp, "_NET_WM_STATE", False); |
@@ -952,6 +957,7 @@ void Ewmh::createAtoms() { | |||
952 | m_net_wm_state_above = XInternAtom(disp, "_NET_WM_STATE_ABOVE", False); | 957 | m_net_wm_state_above = XInternAtom(disp, "_NET_WM_STATE_ABOVE", False); |
953 | m_net_wm_state_below = XInternAtom(disp, "_NET_WM_STATE_BELOW", False); | 958 | m_net_wm_state_below = XInternAtom(disp, "_NET_WM_STATE_BELOW", False); |
954 | m_net_wm_state_modal = XInternAtom(disp, "_NET_WM_STATE_MODAL", False); | 959 | m_net_wm_state_modal = XInternAtom(disp, "_NET_WM_STATE_MODAL", False); |
960 | m_net_wm_state_demands_attention = XInternAtom(disp, "_NET_WM_STATE_DEMANDS_ATTENTION", False); | ||
955 | 961 | ||
956 | // allowed actions | 962 | // allowed actions |
957 | m_net_wm_allowed_actions = XInternAtom(disp, "_NET_WM_ALLOWED_ACTIONS", False); | 963 | m_net_wm_allowed_actions = XInternAtom(disp, "_NET_WM_ALLOWED_ACTIONS", False); |
@@ -1012,7 +1018,6 @@ void Ewmh::setFullscreen(FluxboxWindow &win, bool value) { | |||
1012 | 1018 | ||
1013 | // set window state | 1019 | // set window state |
1014 | void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { | 1020 | void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { |
1015 | |||
1016 | if (state == m_net_wm_state_sticky) { // STICKY | 1021 | if (state == m_net_wm_state_sticky) { // STICKY |
1017 | if (value && !win.isStuck() || | 1022 | if (value && !win.isStuck() || |
1018 | (!value && win.isStuck())) | 1023 | (!value && win.isStuck())) |
@@ -1051,7 +1056,13 @@ void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { | |||
1051 | win.moveToLayer(Layer::ABOVE_DOCK); | 1056 | win.moveToLayer(Layer::ABOVE_DOCK); |
1052 | else | 1057 | else |
1053 | win.moveToLayer(Layer::NORMAL); | 1058 | win.moveToLayer(Layer::NORMAL); |
1059 | } else if (state == m_net_wm_state_demands_attention) { | ||
1060 | if (value) // if add attention | ||
1061 | m_demands_attention.addAttention(win); | ||
1062 | else // erase it | ||
1063 | m_demands_attention.update(&win.attentionSig()); | ||
1054 | } | 1064 | } |
1065 | |||
1055 | // Note: state == net_wm_state_modal, We should not change it | 1066 | // Note: state == net_wm_state_modal, We should not change it |
1056 | } | 1067 | } |
1057 | 1068 | ||