From eed0eb6a476d54ce19aeff137984aa981d9e3976 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 15 Jun 2010 00:59:57 -0700 Subject: Upgrading to iup 3.1 --- iup/src/mot/iupmot_loop.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'iup/src/mot/iupmot_loop.c') diff --git a/iup/src/mot/iupmot_loop.c b/iup/src/mot/iupmot_loop.c index 828ddcd..c1f92ec 100755 --- a/iup/src/mot/iupmot_loop.c +++ b/iup/src/mot/iupmot_loop.c @@ -56,7 +56,7 @@ void iupdrvSetIdleFunction(Icallback f) mot_idle_id = XtAppAddWorkProc(iupmot_appcontext, motIdlecbWorkProc, NULL); } -static int motLoopStep(void) +static int motLoopProcessEvent(void) { XtAppProcessEvent(iupmot_appcontext, XtIMAll); return (mot_exitmainloop)? IUP_CLOSE : IUP_DEFAULT; @@ -79,7 +79,7 @@ int IupMainLoop(void) while (!mot_exitmainloop) { - if (motLoopStep() == IUP_CLOSE) + if (motLoopProcessEvent() == IUP_CLOSE) break; } @@ -88,19 +88,26 @@ int IupMainLoop(void) return IUP_NOERROR; } +int IupLoopStepWait(void) +{ + while(!XtAppPending(iupmot_appcontext)); + + return motLoopProcessEvent(); +} + int IupLoopStep(void) { if (!XtAppPending(iupmot_appcontext)) return IUP_DEFAULT; - return motLoopStep(); + return motLoopProcessEvent(); } void IupFlush(void) { while (XPending(iupmot_display) != 0) { - if (motLoopStep() == IUP_CLOSE) + if (motLoopProcessEvent() == IUP_CLOSE) break; } -- cgit v1.2.3