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>
This commit is contained in:
Marek Chalupa 2015-08-12 09:55:12 +02:00 committed by Bryce Harrington
parent 43af680abf
commit a1f3f3c9f2

View file

@ -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;
}