Re: CList/CTree and Pointer Grabs



On Mon, 25 Sep 2000, Allan Black wrote:

 Hi,

 This question is asked here about each 3 month. Solution is to add one-shot 
idle function (gtk_idle_add) in the button-press-event handler, that function
should run anything needed (like popping up dialog) and return 0 (I don't
remember exactly - it should return the value that causes idle function to be
removed - find out it in the docs). When that idle function will be run,
clist/ctree won't be holding the grab.


> [GTK+ 1.2.8 on Solaris 7]
> 
> Gnome message box is hanging because of a grab on a CList widget ....
> 
> I have a signal function connected to a CTree via "tree_select_row".
> Occasionally, this function detects an "error" and pops up a Gnome
> message box, which it runs using gnome_dialog_run_and_close().
> 
> Unfortunately, since the underlying CList does a grab on the button
> press (both a GTK grab and a pointer grab), I can't OK the message box
> (nor can I select an xterm to kill the application :-(
> 
> What's the best way to avoid this? I suppose I could always forcibly
> remove the grabs before calling gnome_dialog_run_and_close(), but I'd
> rather not interfere with something the CList has set up.
> 
> If I connected the signal handler via gtk_signal_connect_after, would
> that help?
> 
> What I'm really looking for is a signal that gets sent after the button
> release, so that the CList has released the grab. Any advice you can
> offer would be very gratefully received, since it can be VERY
> time-consuming to experiment with something like this :-)
> 
> Allan

 Best regards,
  -Vlad





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