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
1 files changed,
9 insertions(+),
3 deletions(-)
jump to
M
src/Window.cc
→
src/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);