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.

This commit is contained in:
Dana Jansens 2002-08-14 06:15:08 +00:00
parent 75b6a5a378
commit 4bebd476c3

View file

@ -2701,7 +2701,7 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {
if (pe->state == PropertyDelete) if (pe->state == PropertyDelete)
return; return;
#ifdef DEBUG #if 0
fprintf(stderr, "BlackboxWindow::propertyNotifyEvent(): for 0x%lx\n", fprintf(stderr, "BlackboxWindow::propertyNotifyEvent(): for 0x%lx\n",
client.window); client.window);
#endif #endif
@ -2802,7 +2802,7 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {
void BlackboxWindow::exposeEvent(const XExposeEvent *ee) { void BlackboxWindow::exposeEvent(const XExposeEvent *ee) {
#ifdef DEBUG #if 0
fprintf(stderr, "BlackboxWindow::exposeEvent() for 0x%lx\n", client.window); fprintf(stderr, "BlackboxWindow::exposeEvent() for 0x%lx\n", client.window);
#endif #endif
@ -3611,7 +3611,7 @@ void BlackboxWindow::endResize(void) {
void BlackboxWindow::motionNotifyEvent(const XMotionEvent *me) { void BlackboxWindow::motionNotifyEvent(const XMotionEvent *me) {
#ifdef DEBUG #if 0
fprintf(stderr, "BlackboxWindow::motionNotifyEvent() for 0x%lx\n", fprintf(stderr, "BlackboxWindow::motionNotifyEvent() for 0x%lx\n",
client.window); client.window);
#endif #endif
@ -3730,6 +3730,12 @@ void BlackboxWindow::restore(bool remap) {
if (flags.shaded && ! flags.iconic) if (flags.shaded && ! flags.iconic)
setState(NormalState); 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); restoreGravity(client.rect);
XUnmapWindow(blackbox->getXDisplay(), frame.window); XUnmapWindow(blackbox->getXDisplay(), frame.window);