--- libnsfb/src/surface/vnc.c.orig  2014-10-21 14:03:31.740181270 +0000
+++ libnsfb/src/surface/vnc.c   2014-10-21 15:20:02.630965646 +0000
@@ -480,6 +480,7 @@
     rfbScreenInfoPtr vncscreen = nsfb->surface_priv;
 
     rfbMarkRectAsModified(vncscreen, box->x0, box->y0, box->x1, box->y1);
+    rfbProcessEvents(vncscreen, 1);
 
     return 0;
 }
@@ -499,7 +500,7 @@
    event->value.controlcode = NSFB_CONTROL_TIMEOUT;
 
    ret = rfbProcessEvents(vncscreen, timeout * 1000);
-   if (ret == 0) {
+   if (ret == 0 || ret == -1) {
        /* valid event */
        return true;
