[PATCH:libXt] Bug 34715: XtAppMainLoop doesn't work without a Display

walter harms wharms at bfs.de
Mon Mar 7 03:00:53 PST 2011



Am 06.03.2011 21:53, schrieb Alan Coopersmith:
> From: Jordan Hayes <jordan at bitway.com>
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=34715
> 
> XtAppNextEvent() doesn't return until there's an actual XEvent to be
> handled; it handles Xt-internal events (inputs, timers, signals)
> itself, but doesn't return (because of course, those aren't XEvents).
> Which means that the exit flag doesn't get a chance to break the loop
> until/unless there's an actual XEvent.
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

looks ok to me

Signed-off-by: Walter Harms <whamrsm at bfs.de>

> ---
>  src/Event.c |    8 +-------
>  1 files changed, 1 insertions(+), 7 deletions(-)
> 
> diff --git a/src/Event.c b/src/Event.c
> index 7be5987..11823d6 100644
> --- a/src/Event.c
> +++ b/src/Event.c
> @@ -1549,15 +1549,9 @@ void XtMainLoop(void)
>  void XtAppMainLoop(
>  	XtAppContext app)
>  {
> -    XEvent event;
> -
>      LOCK_APP(app);
>      do {
> -    	XtAppNextEvent(app, &event);
> -#ifdef XTHREADS
> -	/* assert(app == XtDisplayToApplicationContext(event.xany.display)); */
> -#endif
> -	XtDispatchEvent(&event);
> +	XtAppProcessEvent(app, XtIMAll);
>      } while(app->exit_flag == FALSE);
>      UNLOCK_APP(app);
>  }


More information about the xorg-devel mailing list