6 static void window_show(d_window_t *w);
7 static void window_hide(d_window_t *w);
9 static void window_become_zombie(d_window_t *w);
12 window_new(xcb_window_t id, struct d_screen *sc)
16 w = malloc(sizeof(d_window_t));
23 /* default functions */
24 w->show = window_show;
25 w->hide = window_hide;
26 w->become_zombie = window_become_zombie;
28 screen_stacking_add(sc, w);
30 printf("new window 0x%x\n", w->id);
36 window_ref(d_window_t *w)
42 window_unref(d_window_t *w)
44 if (w && --w->ref == 0) {
45 screen_stacking_remove(w->sc, w);
51 window_show(d_window_t *w)
53 if (w->mapped) return;
55 printf("show window 0x%x\n", w->id);
61 window_hide(d_window_t *w)
63 if (!w->mapped) return;
65 printf("hide window 0x%x\n", w->id);
71 window_become_zombie(d_window_t *w)
73 if (w->zombie) return;