Re: Xlib: unexpected async reply



Evgeny Repekto wrote:
Hi,

Please help me. I'm doing with threads. The idea is to remove many widgets (>1000) from the container and put there new. I created custom widget. I'm adding them to the box using add() method. Special rotuine is being started in the tread after user has chosen a menu item command. This routine removes all widgets from the container using delete operator. Something happend during or after removing. I get the message "Xlib: unexpected async reply" and my window get stock.

I believe you'll need to use a Glib::Dispatcher to send 'delete signals' across thread boundaries and have a function in the GUI thread actually delete the widgets.

There's some example code in the Glib::Dispatcher docs.

Dispatchers are essentially cross-thread signals but they are restrictive in that they don't allow you to 'send' any arguments. You'll have to use a Glib::Mutex to sync access to thread-shared data if you want to simulate sending objects across thread boundaries.

Edd

Eugene: I think I accidentally sent this to you directly -- my apologies.



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