summaryrefslogtreecommitdiff
path: root/src/xcb_io.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2007-06-02 17:59:15 -0700
committerJamey Sharp <jamey@minilop.net>2007-06-02 17:59:15 -0700
commitf417570735aac865eb6b576d1ea76b5bfcd8573b (patch)
treedbf4eb8a4e3a6363961e6a324d69ba1e26007adc /src/xcb_io.c
parentc337f9de7cfd89f983f83956b7457a274dd412f3 (diff)
Xlib/XCB: inline wait_or_poll_for_event, which now had only one caller.
Commit by Josh Triplett and Jamey Sharp.
Diffstat (limited to 'src/xcb_io.c')
-rw-r--r--src/xcb_io.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/xcb_io.c b/src/xcb_io.c
index dea6b3df..276c1b93 100644
--- a/src/xcb_io.c
+++ b/src/xcb_io.c
@@ -102,21 +102,6 @@ static void call_handlers(Display *dpy, xcb_generic_reply_t *buf)
_XError(dpy, (xError *) buf);
}
-static xcb_generic_event_t * wait_or_poll_for_event(Display *dpy, int wait)
-{
- xcb_connection_t *c = dpy->xcb->connection;
- xcb_generic_event_t *event;
- if(wait)
- {
- UnlockDisplay(dpy);
- event = xcb_wait_for_event(c);
- LockDisplay(dpy);
- }
- else
- event = xcb_poll_for_event(c);
- return event;
-}
-
static void process_responses(Display *dpy, int wait_for_first_event, xcb_generic_error_t **current_error, unsigned int current_request)
{
void *reply;
@@ -125,7 +110,16 @@ static void process_responses(Display *dpy, int wait_for_first_event, xcb_generi
PendingRequest *req;
xcb_connection_t *c = dpy->xcb->connection;
if(!event && dpy->xcb->event_owner == XlibOwnsEventQueue)
- event = wait_or_poll_for_event(dpy, wait_for_first_event);
+ {
+ if(wait_for_first_event)
+ {
+ UnlockDisplay(dpy);
+ event = xcb_wait_for_event(c);
+ LockDisplay(dpy);
+ }
+ else
+ event = xcb_poll_for_event(c);
+ }
while(1)
{