summaryrefslogtreecommitdiff
path: root/src/xcb_in.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2006-10-06 16:12:04 -0700
committerJamey Sharp <jamey@minilop.net>2006-10-06 16:35:36 -0700
commit34168ab549fdf7c6c8a6fbe39824116698d01b12 (patch)
tree0c60107c36d7424296f4c88460ee7ab63708f731 /src/xcb_in.c
parent40589db8124b8c72894deb86a825c6117b0a2cd2 (diff)
Remove the 'int *error' out-parameter for xcb_poll_for_event.
Diffstat (limited to 'src/xcb_in.c')
-rw-r--r--src/xcb_in.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/xcb_in.c b/src/xcb_in.c
index 41764df..b252ffc 100644
--- a/src/xcb_in.c
+++ b/src/xcb_in.c
@@ -395,33 +395,18 @@ xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c)
return ret;
}
-xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c, int *error)
+xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c)
{
+ xcb_generic_event_t *ret = 0;
if(!c->has_error)
{
- xcb_generic_event_t *ret = 0;
- int success;
_xcb_lock_io(c);
/* FIXME: follow X meets Z architecture changes. */
- success = _xcb_in_read(c);
- if(success)
+ if(_xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
ret = get_event(c);
_xcb_unlock_io(c);
- if(success)
- {
- if(error)
- *error = 0;
- return ret;
- }
- }
- if(error)
- *error = -1;
- else
- {
- fprintf(stderr, "xcb_poll_for_event: I/O error occured, but no handler provided.\n");
- abort();
}
- return 0;
+ return ret;
}
xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t cookie)