xwm: flush xcb connection only when we processed some event

xwayland source is checked, so it dispatches twice on any event.
If the other turn has no events to dispatch, we flush the connection
redundantly

v2. do not flood logs with 'unhandled event' messages

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
dev
Marek Chalupa 10 years ago committed by Bryce Harrington
parent 43af680abf
commit a1f3f3c9f2
  1. 3
      xwayland/window-manager.c

@ -1979,7 +1979,8 @@ weston_wm_handle_event(int fd, uint32_t mask, void *data)
count++;
}
xcb_flush(wm->conn);
if (count != 0)
xcb_flush(wm->conn);
return count;
}

Loading…
Cancel
Save