Re: using winapi in gtk



Dnia 15-11-2004, pon o godzinie 20:46 -0500, Allin Cottrell napisał:
Unfortunately it freezes the rest of the GTK gui while the user doesn't 
close the dialog. If it's a networking program, this is usually not 
acceptable.

I get around this by calling GetOpenFileName (or similar) in a new
thread and passing the results back to the gtk mainloop using g_idle_add.

I'm not sure I understand what the problem is here.  Do you mean the 
Windows file dialog is modal?  If so, is that not fairly sensible 
behavior?  ("You said you want to open or save a file; please 
complete or cancel this thought before we attempt to do anything 
else.")

<wild-guess> The issue at hand is rather Win32 mainloop not being
compatible with GTK+ mainloop, so that when Win32 dialog runs, GTK+
isn't getting its share of attention, and consequently, any events
happening aren't processed (which includes drawing requests). This is
different from dialog being modal, where drawing still happens, and it's
only input events that are ignored </wild-guess>

Cheers,
Maciej

-- 
"Tautologizm to coś tautologicznego"
   Maciej Katafiasz <mnews2 wp pl>
         http://mathrick.org




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