summaryrefslogtreecommitdiff
path: root/hw/xquartz/pbproxy/x-input.m
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xquartz/pbproxy/x-input.m')
-rw-r--r--hw/xquartz/pbproxy/x-input.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/xquartz/pbproxy/x-input.m b/hw/xquartz/pbproxy/x-input.m
index 5261212e0..fd59881bb 100644
--- a/hw/xquartz/pbproxy/x-input.m
+++ b/hw/xquartz/pbproxy/x-input.m
@@ -49,6 +49,13 @@ static void x_event_apple_wm_notify(XAppleWMNotifyEvent *e) {
}
void x_input_run (void) {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ if (nil == pool)
+ {
+ fprintf(stderr, "unable to allocate/init auto release pool!\n");
+ return;
+ }
while (XPending (x_dpy) != 0) {
XEvent e;
@@ -82,6 +89,8 @@ void x_input_run (void) {
XFlush(x_dpy);
}
+
+ [pool release];
}
static int add_input_socket (int sock, CFOptionFlags callback_types,