Re: CList/CTree and Pointer Grabs



On Tue, 26 Sep 2000, Allan Black wrote:

> Thanks, Vlad ...
> 
> Using an idle func doesn't help, unfortunately - the idle func is still
> invoked while the clist holds the grab.

 Hmm, yes, I've tested it. The pointer seems to be really grabbed if sel mode
is GTK_SELECTION_BROWSE. I didn't know that. Of course, hackish solutions like
adding idle function from itself until pointer is ungrabbed or adding idle
function with different priority (no checked) should work.
 This seems to be gtk bug.

 Sorry for confusion.

> The problem, it turns out, is using GTK_SELECTION_BROWSE as the clist
> selection mode. Browse mode makes the clist emit the signal while it
> holds the grab.
> 
> The code at the end demonstrates this - if you run the progran with any
> arg, it puts the clist into browse mode, otherwise leaves it in the
> default "single selection" mode. The check_grab function is invoked
> either immediately (from the signal handler), or via gtk_idle_add(),
> depending on which row you select. In "browse" mode, both invocation
> methods call check_grab() with a pointer grab set. Neither have a grab
> when in single mode.
> 
> The reason I wanted to use browse mode is because you can't have a null
> selection in this way, whereas GTK_SELECTION_SINGLE allows you to have a
> clist with nothing highlighted. I want to have exactly one item
> highlighted at all times.
> 
> I suppose I'll have to use "single" mode and code around it (I managed
> to do something similar with an "Undo/Redo Special" type of dialog, so I
> guess I can handle this one :-)
> 
> Allan
> 

 Best regards,
  -Vlad





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