summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_audio')
-rw-r--r--src/lib/ecore_audio/ecore_audio_pulse_ml.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/ecore_audio/ecore_audio_pulse_ml.c b/src/lib/ecore_audio/ecore_audio_pulse_ml.c
index 841719b..19b652f 100644
--- a/src/lib/ecore_audio/ecore_audio_pulse_ml.c
+++ b/src/lib/ecore_audio/ecore_audio_pulse_ml.c
@@ -46,6 +46,7 @@ _ecore_io_wrapper(void *data, Ecore_Fd_Handler *handler)
46 pa_io_event_flags_t flags = 0; 46 pa_io_event_flags_t flags = 0;
47 pa_io_event *event = (pa_io_event *)data; 47 pa_io_event *event = (pa_io_event *)data;
48 int fd = 0; 48 int fd = 0;
49 char *disp = NULL;
49 50
50 fd = ecore_main_fd_handler_fd_get(handler); 51 fd = ecore_main_fd_handler_fd_get(handler);
51 if (fd < 0) return ECORE_CALLBACK_RENEW; 52 if (fd < 0) return ECORE_CALLBACK_RENEW;
@@ -70,7 +71,14 @@ _ecore_io_wrapper(void *data, Ecore_Fd_Handler *handler)
70 if (ecore_main_fd_handler_active_get(handler, ECORE_FD_ERROR)) 71 if (ecore_main_fd_handler_active_get(handler, ECORE_FD_ERROR))
71 flags |= PA_IO_EVENT_ERROR; 72 flags |= PA_IO_EVENT_ERROR;
72 73
74 if (getenv("WAYLAND_DISPLAY"))
75 {
76 disp = eina_strdup(getenv("DISPLAY"));
77 unsetenv("DISPLAY");
78 }
73 event->callback(event->mainloop, event, fd, flags, event->userdata); 79 event->callback(event->mainloop, event, fd, flags, event->userdata);
80 if (disp) setenv("DISPLAY", disp, 1);
81 free(disp);
74 82
75 return ECORE_CALLBACK_RENEW; 83 return ECORE_CALLBACK_RENEW;
76} 84}
@@ -142,9 +150,17 @@ Eina_Bool
142_ecore_time_wrapper(void *data) 150_ecore_time_wrapper(void *data)
143{ 151{
144 pa_time_event *event = (pa_time_event *)data; 152 pa_time_event *event = (pa_time_event *)data;
153 char *disp = NULL;
145 154
155 if (getenv("WAYLAND_DISPLAY"))
156 {
157 disp = eina_strdup(getenv("DISPLAY"));
158 unsetenv("DISPLAY");
159 }
146 event->in_event = 1; 160 event->in_event = 1;
147 event->callback(event->mainloop, event, &event->tv, event->userdata); 161 event->callback(event->mainloop, event, &event->tv, event->userdata);
162 if (disp) setenv("DISPLAY", disp, 1);
163 free(disp);
148 event->in_event = 0; 164 event->in_event = 0;
149 event->timer = NULL; 165 event->timer = NULL;
150 if (event->dead) 166 if (event->dead)