Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#3424) New flush code

[Freeciv-Dev] Re: (PR#3424) New flush code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3424) New flush code
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Wed, 26 Feb 2003 00:20:53 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, Feb 26, 2003 at 12:06:13AM -0800, Jason Short wrote:
> > I think you brought this up and I now think it is a good idea: calling
> > gui_callback_finished after each event. For this we have to break up
> > the main loop. This is possible for:
> >  - xaw:
> >  - gtk: 
> >
> >  - gtk2: 
> >
> > 
> > sdl, win32 and mui already have to loop broken up in the current
> > source code.
> I don't understand what you're saying.  You want to break up the GUI's 
> main event loop, replacing gtk_main() with something like
>    while (!done) {
>      gtk_main_iteration();
>      flush_dirty();
>    }
> ?


> What if flush_dirty() itself generates a new GTK/GDK event?

As it should do this only once this isn't a problem.

> This is again hideously expensive

Why is it expensive? You call flush_dirty, see that num_dirty_rects is
0 and return.

> and quite error-prone.

Why? I don't think so. I think it is the cleanest solution and the one
with the fewest possible errors.


 email: rf13@xxxxxxxxxxxxxxxxx
 "SIGDANGER - The System is likely to crash soon"

[Prev in Thread] Current Thread [Next in Thread]