Re: gtk_window_set_focus()



Hi,

On 12/23/05, Richard Boaz <riboaz xs4all nl> wrote:
> One issue that came up over time (when actually unleashed to the end
> users...) was that when the program was away reading the files, user
> events (e.g., mouse click) would get caught and (maybe) cause problems
> since the program was not in the proper state to process this event
> properly.
>
> I got around this by introducing an invisible widget used to grab focus
> while the program is off reading and processing files, and then ungrabbing
> this focus once the program's processing is complete, thus disallowing any
> user events to be propogated to the widget receiving the user event.  This
> also works just fine.

How about popping up a modal dialog saying "Procesing, please wait
...". The dialog will receive all mouse and keyboard events and they
won't get queued on your main window. When processing finishes, pop
down the dialog and your app will still be as it was.

I guess a better solution would be to thread your program and display
a %complete bar, but I imagine that would be more work.

John



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