diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-04-22 21:49:30 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-04-22 21:49:30 +0000 |
commit | 5e50f84e71b948b4737fe8b5860e5fe414258570 (patch) | |
tree | 57def92e771466a589e3d659d2c70ef533f704b3 /src/polypcore | |
parent | 55e19cbc039be4481215d19b39452ab9fc9d0d11 (diff) |
fix x11 handling
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@776 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/polypcore')
-rw-r--r-- | src/polypcore/x11wrap.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/polypcore/x11wrap.c b/src/polypcore/x11wrap.c index 21a7f307..c1ca83ca 100644 --- a/src/polypcore/x11wrap.c +++ b/src/polypcore/x11wrap.c @@ -87,6 +87,9 @@ static void display_io_event(pa_mainloop_api *m, pa_io_event *e, int fd, PA_GCC_ static void defer_event(pa_mainloop_api *m, pa_defer_event *e, void *userdata) { pa_x11_wrapper *w = userdata; assert(m && e && w && w->ref >= 1); + + m->defer_enable(e, 0); + work(w); } @@ -96,6 +99,8 @@ static void internal_io_event(pa_mainloop_api *m, pa_io_event *e, int fd, PA_GCC assert(m && e && fd >= 0 && w && w->ref >= 1); XProcessInternalConnection(w->display, fd); + + work(w); } /* Add a new IO source for the specified X11 internal connection */ @@ -211,6 +216,10 @@ void pa_x11_wrapper_unref(pa_x11_wrapper* w) { Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w) { assert(w && w->ref >= 1); + + /* Somebody is using us, schedule a output buffer flush */ + w->core->mainloop->defer_enable(w->defer_event, 1); + return w->display; } |