all repos — fluxbox @ 206a7ca10d0747acaab1f00975ff519badf61600

custom fork of the fluxbox windowmanager

fix _NET_WM_DESKTOP client message handling
rathnor rathnor
commit

206a7ca10d0747acaab1f00975ff519badf61600

parent

c0325e612783dfeb2d032a5dc69339dbbb2772c9

2 files changed, 27 insertions(+), 8 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,9 @@

(Format: Year/Month/Day) Changes for 0.9.9: +*04/03/08: + * Fix receipt of _NET_WM_DESKTOP client messages (Simon) + - fixes xmms "show on all desktops" not working + Ewmh.cc *04/03/03: * Fix update of keys on keymap change (Simon) fluxbox.cc
M src/Ewmh.ccsrc/Ewmh.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Ewmh.cc,v 1.44 2004/02/20 09:05:38 fluxgen Exp $ +// $Id: Ewmh.cc,v 1.45 2004/03/07 23:37:39 rathnor Exp $ #include "Ewmh.hh"

@@ -498,15 +498,30 @@ // return true if we did handle the atom here

bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient) { if (ce.message_type == m_net_wm_desktop) { - if (screen == 0) + // ce.data.l[0] = workspace number + // valid window + + if (winclient == 0 || winclient->fbwindow() == 0) return true; - // ce.data.l[0] = workspace number - // valid window and workspace number? - if (winclient == 0 || winclient->fbwindow() == 0 || - static_cast<unsigned int>(ce.data.l[0]) >= screen->getCount()) + + FluxboxWindow *fbwin = winclient->fbwindow(); + + // if it's stick, make sure it is stuck. + // otherwise, make sure it isn't stuck + if (ce.data.l[0] == 0xFFFFFFFF) { + if (!fbwin->isStuck()) + fbwin->stick(); return true; - - screen->sendToWorkspace(ce.data.l[0], winclient->fbwindow(), false); + } else if (fbwin->isStuck()) + fbwin->stick(); + + // the screen is the root window of the message, + // which doesn't apply here (so borrow the variable :) ) + screen = &fbwin->screen(); + // valid workspace number? + if (static_cast<unsigned int>(ce.data.l[0]) < screen->getCount()) + screen->sendToWorkspace(ce.data.l[0], fbwin, false); + return true; } else if (ce.message_type == m_net_wm_state) { if (winclient == 0 || winclient->fbwindow() == 0)