зеркало из https://github.com/mozilla/pjs.git
Bug 301161. Fix gtk1 too.
This commit is contained in:
Родитель
ceca37103d
Коммит
32a0d273a5
|
@ -165,8 +165,14 @@ xt_event_polling_timer_callback(gpointer user_data)
|
|||
display = (Display *)user_data;
|
||||
ac = XtDisplayToApplicationContext(display);
|
||||
|
||||
/* don't starve the primary event queue - just process one event */
|
||||
if (XtAppPending(ac))
|
||||
/* We need to process many Xt events here. If we just process
|
||||
one event we might starve one or more Xt consumers. On the other hand
|
||||
this could hang the whole app if Xt events come pouring in. So process
|
||||
up to 20 Xt events right now and save the rest for later. This is a hack,
|
||||
but it oughta work. We *really* should have out of process plugins.
|
||||
*/
|
||||
int eventsToProcess = 20;
|
||||
while (eventsToProcess-- && XtAppPending(ac))
|
||||
XtAppProcessEvent(ac, XtIMAll);
|
||||
|
||||
/* restart the timer */
|
||||
|
|
Загрузка…
Ссылка в новой задаче