mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-10 15:54:17 +01:00
- Fixed problem calling W_FlushIdleNotificationQueue() when there was no idle
handler installed. - Fixed some problem with ASAP notification queues - fixed a memleak related to notification queues.
This commit is contained in:
@@ -327,7 +327,9 @@ checkIdleHandlers()
|
||||
IdleHandler *handler, *tmp;
|
||||
|
||||
if (!idleHandler) {
|
||||
return False;
|
||||
W_FlushIdleNotificationQueue();
|
||||
/* make sure an observer in queue didn't added an idle handler */
|
||||
return (idleHandler!=NULL);
|
||||
}
|
||||
|
||||
handler = idleHandler;
|
||||
@@ -343,8 +345,11 @@ checkIdleHandlers()
|
||||
|
||||
handler = tmp;
|
||||
}
|
||||
|
||||
return True;
|
||||
|
||||
W_FlushIdleNotificationQueue();
|
||||
|
||||
/* this is not necesarrily False, because one handler can re-add itself */
|
||||
return (idleHandler!=NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -922,9 +927,6 @@ WMNextEvent(Display *dpy, XEvent *event)
|
||||
/* Do idle stuff */
|
||||
/* Do idle and timer stuff while there are no timer or X events */
|
||||
while (!XPending(dpy) && checkIdleHandlers()) {
|
||||
|
||||
W_FlushIdleNotificationQueue();
|
||||
|
||||
/* dispatch timer events */
|
||||
if (timerPending())
|
||||
checkTimerHandlers();
|
||||
@@ -959,9 +961,6 @@ WMMaskEvent(Display *dpy, long mask, XEvent *event)
|
||||
while (!XCheckMaskEvent(dpy, mask, event)) {
|
||||
/* Do idle stuff while there are no timer or X events */
|
||||
while (checkIdleHandlers()) {
|
||||
|
||||
W_FlushIdleNotificationQueue();
|
||||
|
||||
if (XCheckMaskEvent(dpy, mask, event))
|
||||
return;
|
||||
}
|
||||
@@ -1007,9 +1006,6 @@ WMMaskEvent(Display *dpy, long mask, XEvent *event)
|
||||
while (!XCheckMaskEvent(dpy, mask, event)) {
|
||||
/* Do idle stuff while there are no timer or X events */
|
||||
while (checkIdleHandlers()) {
|
||||
|
||||
W_FlushIdleNotificationQueue();
|
||||
|
||||
if (XCheckMaskEvent(dpy, mask, event))
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user