objs = $(sources:.c=.o)
headers = $(wildcard *.h)
-CFLAGS=$(shell pkg-config --cflags xcb-composite xcb-damage glib-2.0) -ggdb -W -Wall
-LIBS=$(shell pkg-config --libs xcb-composite xcb-damage glib-2.0) # -lefence
+CFLAGS=$(shell pkg-config --cflags xcb-composite xcb-damage glib-2.0) -ggdb -W -Wall #-DEFENCE
+LIBS=$(shell pkg-config --libs xcb-composite xcb-damage glib-2.0) #-lefence
dcompmgr: $(objs)
$(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
+#include "efence.h"
+
#include "screen.h"
#include "window.h"
#include "list.h"
sc = display_screen_from_root(dpy, cev->parent);
if (!sc) break;
w = screen_add_window(sc, cev->window);
- printf("created 0x%x\n", w);
break;
}
case XCB_DESTROY_NOTIFY:
sc = display_screen_from_root(dpy, dev->event);
if (!sc) break;
w = screen_find_window(sc, dev->window);
- printf("destroyed 0x%x\n", w);
vis = window_is_mapped(w);
sc->window_hide(w);
screen_remove_window(sc, w);
else {
sc->window_hide(w);
screen_remove_window(sc, w);
- printf("reparent lost 0x%x\n", w);
}
screen_refresh(w->sc);
break;
sc = display_screen_from_root(dpy, mev->event);
if (!sc) break;
w = screen_find_window(sc, mev->window);
- printf("mapping 0x%x\n", w);
sc->window_show(w);
screen_refresh(w->sc);
break;
for (sc_it = list_top(dpy->screens); sc_it; sc_it = sc_it->next) {
d_screen_t *sc = sc_it->data;
d_list_it_t *it;
- for (it = list_top(sc->stacking); it; it = it->next)
+ for (it = list_bottom(sc->stacking); it; it = it->prev)
if (window_is_mapped(it->data))
sc->window_show(it->data);
}
for (sc_it = list_top(dpy->screens); sc_it; sc_it = sc_it->next) {
d_screen_t *sc = sc_it->data;
d_list_it_t *it;
- for (it = list_top(sc->stacking); it; it = it->next)
- sc->window_hide(it->data);
+ for (it = list_top(sc->stacking); it; it = it->next) {
+ if (window_is_mapped(it->data))
+ sc->window_hide(it->data);
+ }
}
}
+#include "efence.h"
+
#include "display.h"
#include "screen.h"
#include "list.h"
if (dpy && --dpy->ref == 0) {
d_list_it_t *it;
- xcb_disconnect(dpy->conn);
-
for (it = list_top(dpy->screens); it; it = it->next)
screen_unref(it->data);
list_unref(dpy->screens);
+
+ xcb_disconnect(dpy->conn);
free(dpy);
}
}
#define dc__display_h
#include <xcb/xcb.h>
-//#include <efence.h>
#include <glib.h>
--- /dev/null
+#ifdef EFENCE
+#include <stdlib.h>
+#include <string.h>
+#include <efence.h>
+#endif
+#include "efence.h"
+
#include "list.h"
#include <assert.h>
#include <stdlib.h>
+#include "efence.h"
+
#include "plugin.h"
#include "list.h"
#include <stdlib.h>
+#include "efence.h"
+
#include "render.h"
#include "screen.h"
#include "window.h"
+#include "efence.h"
+
#include "screen.h"
#include "display.h"
#include "plugin.h"
screen_unref(d_screen_t *sc)
{
if (sc && --sc->ref == 0) {
- d_list_it_t *it;
+ d_list_it_t *it, *next;
g_hash_table_unref(sc->winhash);
- for (it = list_top(sc->stacking); it; it = it->next)
+ for (it = list_top(sc->stacking); it; it = next) {
+ next = it->next;
window_unref(it->data);
+ }
list_unref(sc->stacking);
list_unref(sc->plugin_data);
free(sc);
plugin_data_remove(sc->plugin_data, id);
}
-void screen_refresh(d_screen_t *sc)
+void
+screen_refresh(d_screen_t *sc)
{
sc->need_repaint = TRUE;
//printf("*** need repaint! ***\n");
+#include "efence.h"
+
#include "window.h"
#include "screen.h"
#include "plugin.h"
if (!window_is_input_only(pubw)) {
assert(w->damage == XCB_NONE);
w->damage = xcb_generate_id(w->sc->dpy->conn);
+ //printf("creating damage 0x%x\n", w->damage);
xcb_damage_create(w->sc->dpy->conn, w->damage, w->id,
XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY);
}
d_window_priv_t *w = (d_window_priv_t*)pubw;
if (w->damage) {
+ //printf("destroying damage 0x%x\n", w->damage);
xcb_damage_destroy(w->sc->dpy->conn, w->damage);
w->damage = XCB_NONE;
}