From 4bebd476c30492f26421392a4d6dd0a20289aaa7 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 14 Aug 2002 06:15:08 +0000 Subject: [PATCH] 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. --- src/Window.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index 60182ce9..dd5f3b71 100644 --- a/src/Window.cc +++ b/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::propertyNotifyEvent(const XPropertyEvent *pe) { 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::endResize(void) { void BlackboxWindow::motionNotifyEvent(const XMotionEvent *me) { -#ifdef DEBUG +#if 0 fprintf(stderr, "BlackboxWindow::motionNotifyEvent() for 0x%lx\n", client.window); #endif @@ -3730,6 +3730,12 @@ void BlackboxWindow::restore(bool remap) { 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); XUnmapWindow(blackbox->getXDisplay(), frame.window); -- 2.39.2