Win32 - handling mainloop while showing modal comon controls



Alexander Larsson writes:
 > My approach is to iterate the gtk+ mainloop from the win32 mainloop when 
 > there are messages in the gdk queue, but limit the gtk+ mainloop so that 
 > it only looks at events in the gdk event queue and touch the Win32
 > message queue. The way we do this is that whenever there is a modal win32 
 > dialog (with its own mainloop) up we set a special variable in gdk that 
 > causes it to not get messages from win32, and to send a message to a 
 > specified window whenever we put an event in the gdk event queue. We then 
 > use special hooks in the print dialog functions to receive this message 
 > and pump the gtk+ mainloop.

This is a clever and nice way to handle the problem.

 > The attached patch does this, and it seems to work fine for me. Its not an 
 > ideal solution, since we only handle events generated from windows, not 
 > e.g. glib timeouts, or other fd:s added to the gtk+ mainloop. However, i'm 
 > not sure that is an enourmous problem.

If it turns out to be a problem, some way to handle it will have to be
worked out...

I like the idea, relatively clean, and indeed seems to work fine. I'm
all for it.

--tml




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]