trying to launch a dialog from outside the main gui thread by emiting a signal to the thread.



I am currently working on a multithreaded application which has a primary
GUI that is always running and I need to be able to get that GUI to show a
popup to put images in.  The problem I am having is how do I tell the GUI to
show the popup from outside of its own code?  

As a test I connected the "keys-changed" signal for the GUI's window so that
if that signal gets emitted it launches my dialog.  I then added an external
function which emits that signal which, when called, crashes the application
with:

Xlib: unexpected async reply (sequence 0x995)!
Xlib: sequence lost (0x108c7 > 0xfd) in reply type 0x8!
Xlib: sequence lost (0x10000 > 0xfd) in reply type 0x0!

I do know that only the primary GUI thread is allowed to handle X calls
which is why I had the signal handler launching my dialog.  I have tried
googling for information but Im not finding much.

Thanks,

Kevin





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