aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-03-07 23:37:39 (GMT)
committerrathnor <rathnor>2004-03-07 23:37:39 (GMT)
commit206a7ca10d0747acaab1f00975ff519badf61600 (patch)
tree21a0c86664ffc7a9d961ded8a976198ea0e54535
parentc0325e612783dfeb2d032a5dc69339dbbb2772c9 (diff)
downloadfluxbox-206a7ca10d0747acaab1f00975ff519badf61600.zip
fluxbox-206a7ca10d0747acaab1f00975ff519badf61600.tar.bz2
fix _NET_WM_DESKTOP client message handling
-rw-r--r--ChangeLog4
-rw-r--r--src/Ewmh.cc31
2 files changed, 27 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 7252d32..89f5938 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.9: 2Changes for 0.9.9:
3*04/03/08:
4 * Fix receipt of _NET_WM_DESKTOP client messages (Simon)
5 - fixes xmms "show on all desktops" not working
6 Ewmh.cc
3*04/03/03: 7*04/03/03:
4 * Fix update of keys on keymap change (Simon) 8 * Fix update of keys on keymap change (Simon)
5 fluxbox.cc 9 fluxbox.cc
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index 7f23302..64583cc 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Ewmh.cc,v 1.44 2004/02/20 09:05:38 fluxgen Exp $ 22// $Id: Ewmh.cc,v 1.45 2004/03/07 23:37:39 rathnor Exp $
23 23
24#include "Ewmh.hh" 24#include "Ewmh.hh"
25 25
@@ -498,15 +498,30 @@ void Ewmh::updateWorkspace(FluxboxWindow &win) {
498bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, 498bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
499 BScreen * screen, WinClient * const winclient) { 499 BScreen * screen, WinClient * const winclient) {
500 if (ce.message_type == m_net_wm_desktop) { 500 if (ce.message_type == m_net_wm_desktop) {
501 if (screen == 0)
502 return true;
503 // ce.data.l[0] = workspace number 501 // ce.data.l[0] = workspace number
504 // valid window and workspace number? 502 // valid window
505 if (winclient == 0 || winclient->fbwindow() == 0 || 503
506 static_cast<unsigned int>(ce.data.l[0]) >= screen->getCount()) 504 if (winclient == 0 || winclient->fbwindow() == 0)
507 return true; 505 return true;
508 506
509 screen->sendToWorkspace(ce.data.l[0], winclient->fbwindow(), false); 507 FluxboxWindow *fbwin = winclient->fbwindow();
508
509 // if it's stick, make sure it is stuck.
510 // otherwise, make sure it isn't stuck
511 if (ce.data.l[0] == 0xFFFFFFFF) {
512 if (!fbwin->isStuck())
513 fbwin->stick();
514 return true;
515 } else if (fbwin->isStuck())
516 fbwin->stick();
517
518 // the screen is the root window of the message,
519 // which doesn't apply here (so borrow the variable :) )
520 screen = &fbwin->screen();
521 // valid workspace number?
522 if (static_cast<unsigned int>(ce.data.l[0]) < screen->getCount())
523 screen->sendToWorkspace(ce.data.l[0], fbwin, false);
524
510 return true; 525 return true;
511 } else if (ce.message_type == m_net_wm_state) { 526 } else if (ce.message_type == m_net_wm_state) {
512 if (winclient == 0 || winclient->fbwindow() == 0) 527 if (winclient == 0 || winclient->fbwindow() == 0)