mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-27 18:35:52 +01:00
fixed idle notification posting
This commit is contained in:
@@ -115,7 +115,6 @@ static WMEventHook *extraEventHandler=NULL;
|
|||||||
|
|
||||||
#define timerPending() (timerHandler)
|
#define timerPending() (timerHandler)
|
||||||
|
|
||||||
#define idlePending() (idleHandler)
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -322,14 +321,13 @@ WMDeleteInputHandler(WMHandlerID handlerID)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static Bool
|
||||||
checkIdleHandlers()
|
checkIdleHandlers()
|
||||||
{
|
{
|
||||||
IdleHandler *handler, *tmp;
|
IdleHandler *handler, *tmp;
|
||||||
|
|
||||||
if (!idleHandler) {
|
if (!idleHandler) {
|
||||||
W_FlushIdleNotificationQueue();
|
return False;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handler = idleHandler;
|
handler = idleHandler;
|
||||||
@@ -345,7 +343,8 @@ checkIdleHandlers()
|
|||||||
|
|
||||||
handler = tmp;
|
handler = tmp;
|
||||||
}
|
}
|
||||||
W_FlushIdleNotificationQueue();
|
|
||||||
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -922,9 +921,10 @@ WMNextEvent(Display *dpy, XEvent *event)
|
|||||||
while (XPending(dpy) == 0) {
|
while (XPending(dpy) == 0) {
|
||||||
/* Do idle stuff */
|
/* Do idle stuff */
|
||||||
/* Do idle and timer stuff while there are no timer or X events */
|
/* Do idle and timer stuff while there are no timer or X events */
|
||||||
while (!XPending(dpy) && idlePending()) {
|
while (!XPending(dpy) && checkIdleHandlers()) {
|
||||||
if (idlePending())
|
|
||||||
checkIdleHandlers();
|
W_FlushIdleNotificationQueue();
|
||||||
|
|
||||||
/* dispatch timer events */
|
/* dispatch timer events */
|
||||||
if (timerPending())
|
if (timerPending())
|
||||||
checkTimerHandlers();
|
checkTimerHandlers();
|
||||||
@@ -958,8 +958,10 @@ WMMaskEvent(Display *dpy, long mask, XEvent *event)
|
|||||||
|
|
||||||
while (!XCheckMaskEvent(dpy, mask, event)) {
|
while (!XCheckMaskEvent(dpy, mask, event)) {
|
||||||
/* Do idle stuff while there are no timer or X events */
|
/* Do idle stuff while there are no timer or X events */
|
||||||
while (idlePending()) {
|
while (checkIdleHandlers()) {
|
||||||
checkIdleHandlers();
|
|
||||||
|
W_FlushIdleNotificationQueue();
|
||||||
|
|
||||||
if (XCheckMaskEvent(dpy, mask, event))
|
if (XCheckMaskEvent(dpy, mask, event))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1004,8 +1006,10 @@ WMMaskEvent(Display *dpy, long mask, XEvent *event)
|
|||||||
{
|
{
|
||||||
while (!XCheckMaskEvent(dpy, mask, event)) {
|
while (!XCheckMaskEvent(dpy, mask, event)) {
|
||||||
/* Do idle stuff while there are no timer or X events */
|
/* Do idle stuff while there are no timer or X events */
|
||||||
while (idlePending()) {
|
while (checkIdleHandlers()) {
|
||||||
checkIdleHandlers();
|
|
||||||
|
W_FlushIdleNotificationQueue();
|
||||||
|
|
||||||
if (XCheckMaskEvent(dpy, mask, event))
|
if (XCheckMaskEvent(dpy, mask, event))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user