diff options
author | Bill Spitzak <spitzak@gmail.com> | 2012-06-05 17:08:23 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-05 17:08:23 -0400 |
commit | b715ceca332a823705974b984622de748eed2460 (patch) | |
tree | b50736fa6ed9da2e9c9269eec8b3769657e9c31c | |
parent | 771241e88fffd407a4781f9c7d6dea67bf041756 (diff) |
The event handler is supposed to return 0 if no events were handled and
a positive number if events were handled. event always end up being NULL
however, so we always return 0.
-rw-r--r-- | src/compositor-x11.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compositor-x11.c b/src/compositor-x11.c index d23553e..edb6f04 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -619,8 +619,10 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data) uint32_t *k; uint32_t i, set; wl_fixed_t x, y; + int count; prev = NULL; + count = 0; while (x11_compositor_next_event(c, &event, mask)) { switch (prev ? prev->response_type & ~0x80 : 0x80) { case XCB_KEY_RELEASE: @@ -756,6 +758,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data) break; } + count++; if (prev != event) free (event); } @@ -774,7 +777,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data) break; } - return event != NULL; + return count; } #define F(field) offsetof(struct x11_compositor, field) |