And also write out a warning when we got some event that
we cannot handle.

Signed-off-by: Marek Chalupa <[email protected]>
---
 xwayland/window-manager.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 039f0cd..b1fd12d 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -1930,13 +1930,17 @@ weston_wm_handle_event(int fd, uint32_t mask, void 
*data)
                case XCB_CLIENT_MESSAGE:
                        weston_wm_handle_client_message(wm, event);
                        break;
+               default:
+                       fprintf(stderr, "WARNING: xwm unhandled event: %p %d\n",
+                               event, event ? EVENT_TYPE(event) :-1);
                }
 
                free(event);
                count++;
        }
 
-       xcb_flush(wm->conn);
+       if (count != 0)
+               xcb_flush(wm->conn);
 
        return count;
 }
-- 
2.1.0

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to