all repos — openbox @ 4bebd476c30492f26421392a4d6dd0a20289aaa7

openbox fork - make it a bit more like ryudo

remove the net_wm_desktop/state hints from a window when we stop managing it, so that if an app reuses the window, we don't place it on the wrong workspace the second time.
Dana Jansens danakj@orodu.net
commit

4bebd476c30492f26421392a4d6dd0a20289aaa7

parent

75b6a5a378966efc09c355109ab42467ddc6d845

1 files changed, 9 insertions(+), 3 deletions(-)

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

@@ -2701,7 +2701,7 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {

if (pe->state == PropertyDelete) return; -#ifdef DEBUG +#if 0 fprintf(stderr, "BlackboxWindow::propertyNotifyEvent(): for 0x%lx\n", client.window); #endif

@@ -2802,7 +2802,7 @@ }

void BlackboxWindow::exposeEvent(const XExposeEvent *ee) { -#ifdef DEBUG +#if 0 fprintf(stderr, "BlackboxWindow::exposeEvent() for 0x%lx\n", client.window); #endif

@@ -3611,7 +3611,7 @@ }

void BlackboxWindow::motionNotifyEvent(const XMotionEvent *me) { -#ifdef DEBUG +#if 0 fprintf(stderr, "BlackboxWindow::motionNotifyEvent() for 0x%lx\n", client.window); #endif

@@ -3729,6 +3729,12 @@

// do not leave a shaded window as an icon unless it was an icon if (flags.shaded && ! flags.iconic) setState(NormalState); + + // erase the netwm stuff that we read when a window maps, so that it + // doesn't persist between mappings. + // (these are the ones read in getNetWMFlags().) + xatom->eraseValue(client.window, XAtom::net_wm_desktop); + xatom->eraseValue(client.window, XAtom::net_wm_state); restoreGravity(client.rect);