 +static int bapp_ref_count = 0;
 +static int events_wr;
 +
++/* count of pending repaints */
++static vint32 repaints = 0;
++//TODO:use double-buffering with a BBitmap
++
 +static void haiku_handle_event(void *opaque);
 +
 +static status_t bmessage_input(QEWindow *win, QEView *view, BMessage *message)

+    s->clip_x2 = s->width;
+    s->clip_y2 = s->height;
+
+	BRect frame(0, 0, s->width - 1, s->height - 1);
+
+	QEView *v = new QEView(frame, "qemacs");
+	ctx->v = v;
+
+	frame.OffsetTo(200, 200);
+
+    ctx->w = new QEWindow(frame, "qemacs", v);
+    ctx->w->AddChild(ctx->v);

retrieving revision 1.12
diff -u -r1.12 html2png.c
--- html2png.c	11 Jan 2008 11:29:28 -0000	1.12
+++ html2png.c	14 Mar 2013 18:45:07 -0000
@@ -135,7 +135,7 @@
 /* realloc ppm bitmap */
 static int ppm_resize(QEditScreen *s, int w, int h)
