}
static void
+paint(d_display_t *dpy)
+{
+ int i;
+
+ for (i = 0; i < dpy->nscreens; ++i) {
+ d_screen_t *sc = display_screen_n(dpy, i);
+
+ sc->paint(sc);
+ }
+}
+
+static void
run(d_display_t *dpy)
{
gboolean quit;
FD_SET(dpy->fd, &fds);
max = MAX(max, dpy->fd);
+ paint(dpy);
+
quit = FALSE;
while (!quit) {
int r;
printf("select data\n");
/*if (FD_ISSET(dpy->fd, &fds))*/ {
event(dpy);
+ paint(dpy);
}
}
#include "display.h"
#include "list.h"
#include "window.h"
+#include "render.h"
#include "gettext.h"
#include <string.h>
#include <stdlib.h>
xcb_change_window_attributes(sc->dpy->conn, sc->super.root,
XCB_CW_EVENT_MASK, &mask);
+ /* use the render backend */
+ sc->paint = render_paint_screen;
+
sc->winhash = g_hash_table_new((GHashFunc)xcb_window_hash,
(GCompareFunc)xcb_window_compare);
sc->stacking = list_new();
GHashTable *winhash;
struct d_list *stacking;
+
+ void (*paint)(struct d_screen *sc);
} d_screen_t;
/*! Tries to register on the screen given by @sc. If it succeeds, it fills