Creating a popup from an event of another Thread
- From: "Yunus Arslan" <brainiac_s hotmail com>
- To: gtkmm-list gnome org
- Subject: Creating a popup from an event of another Thread
- Date: Thu, 28 Sep 2006 08:57:22 +0000
I will design a GTKmm application with two threads. One for UI (high
and another (lower priority) waiting for network events. This way the UI
time will be fast.
Everything work fine except one particular case. Let's imagine the network
thread fire an event, and UI should respond by creating a popup.
I have tried several methods to communicate and interact between threads
but none solved my problem.
Method 1 :
- I have added a gtk idle function to UI thread, that pop events received
the network thread. If I create a popup from the gtk idle, it is displayed
screen freeze. I think it's because the popup has been created outside the
event loop. Am I right ?
Method 2 :
- The network thread has a sigc::signal that I have connected to a
When I fire the signal, I get this error message :
Xlib: unexpected async reply (sequence 0xf6)!
(main:22651): Gdk-CRITICAL **: gdk_window_set_geometry_hints: assertion
`window != NULL' failed
(main:22651): Gdk-CRITICAL **: gdk_window_move_resize: assertion `window !=
Any idea to solve, or explain this problem ?
Thanks in advance,
] [Thread Prev