Re: Focus in event problem



Paul Davis wrote:

I have a problem here with focus_in event.

When my app is creating combobox widget, it is setting focus_in and focus_out events to perform some function. For instance, one function filling dropdown list in separate thread, then inform GTK-thread to get this data and set it for my combobox. The problem is I have this assertion when moving into combobox with TAB-key:

1) are you using the gdk-level thread/mutex calls (gdk_threads_init(),
    gdk_threads_enter(), gdk_threads_leave()).
2) most people find it simpler to ensure that only 1 thread
     makes GTK+/GDK/Xlib calls.

if you don't do one of these, you will get precisely the kinds of
problems you are encountering.

--p

Well, actually, I am using gtkmm with dispatcher notification mechanism. So, all updates is going thru single GUI-thread. The bad thig - when I removed thread creation in focus event and tried to do all things just in one GUI-thread I got same assertion.

I will separate this part of code out of my app and do some tests around it...

Regards,
-andrew





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