if (!sc) break;
w = screen_find_window(sc, dev->window);
vis = window_is_mapped(w);
- sc->window_hide(w);
+ if (vis)
+ sc->window_hide(w);
screen_remove_window(sc, w);
if (vis) screen_refresh(sc);
break;
if (rev->parent == sc->super.root)
screen_add_window(sc, rev->window);
else {
- sc->window_hide(w);
+ if (window_is_mapped(w))
+ sc->window_hide(w);
screen_remove_window(sc, w);
}
screen_refresh(w->sc);
cev = (xcb_configure_notify_event_t*)ev;
sc = display_screen_from_root(dpy, cev->event);
if (!sc) break;
+ //printf("configure 0x%x", cev->window);
w = screen_find_window(sc, cev->window);
window_get_area(w, &x, &y, &width, &height, &bwidth);
if (x != cev->x || y != cev->y || width != cev->width ||
window_configure(w, cev->x, cev->y,
cev->width, cev->height,
cev->border_width);
- if (window_is_mapped(w) &&
- (width != cev->width ||
- height != cev->height || bwidth != cev->border_width))
- sc->window_resize(w);
+ if (window_is_mapped(w)) {
+ if (x != cev->x || y != cev->y)
+ sc->window_move(w);
+ if (width != cev->width ||
+ height != cev->height || bwidth != cev->border_width)
+ sc->window_resize(w);
+ }
}
above = screen_find_window(sc, cev->above_sibling);
screen_stacking_move_above(sc, w, above);
d_screen_t *sc = sc_it->data;
d_list_it_t *it;
for (it = list_bottom(sc->stacking); it; it = it->prev)
- if (window_is_mapped(it->data))
+ if (window_is_mapped(it->data)) {
+ /* make the window think it is unmapped so that the
+ show works right */
+ window_fake_unmapped(it->data);
sc->window_show(it->data);
+ }
}
}