summaryrefslogtreecommitdiff
path: root/xcb.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2010-07-20 20:13:40 +0200
committerMichael Stapelberg <michael@stapelberg.de>2010-07-20 20:13:40 +0200
commit9d19a8bb53d7285ba352004e47e76474f20ab7c2 (patch)
tree566d9361e46d82e94dfff0ddcd863aa3bac28c26 /xcb.c
parent6a52ba8beabbb26ebcd2716d4c2734cb7500a33d (diff)
make event loop simpler (Thanks to Jamey Sharp)
As explained in Jamey’s post on the XCB mailing list, the event loop can/should be written in a more simple way than it was before in xcb-event. See: <AANLkTinhIM320wUjSeHkBTVk4ysBuiSZkvfs8pMLVykO@mail.gmail.com> or http://lists.freedesktop.org/archives/xcb/2010-July/006292.html
Diffstat (limited to 'xcb.c')
-rw-r--r--xcb.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/xcb.c b/xcb.c
index 2fdb841..5627af1 100644
--- a/xcb.c
+++ b/xcb.c
@@ -27,23 +27,6 @@ static uint32_t get_colorpixel(char *hex) {
return (rgb16[0] << 16) + (rgb16[1] << 8) + rgb16[2];
}
-int x_event_type(xcb_generic_event_t *event) {
- /* TODO: comment */
- assert(event->response_type != 1);
-
- if (event->response_type == 0) {
- fprintf(stderr, "error\n");
- exit(1);
- }
- int type = event->response_type;
- assert(type < 256);
- /* strip the highest bit (TODO: why?) */
- type &= 0x7F;
- assert(type >= 2);
-
- return type;
-}
-
xcb_visualtype_t *get_root_visual_type(xcb_screen_t *screen) {
xcb_visualtype_t *visual_type = NULL;
xcb_depth_iterator_t depth_iter;