Re: emit_event warning in GnomeCanvas



On Thu, 2001-12-06 at 20:36, Owen Taylor wrote:
> 
> jacob berkman <jacob ximian com> writes:
> 
> > On Thu, 2001-12-06 at 17:30, Darin Adler wrote:
> > > When I click on the background of the icon view in Nautilus, I get a warning
> > > from emit_event. The warning is a bit cryptic because it just says
> > > "emit_event is about to return FALSE". I think it has something to do with
> > > canvas grab, but I don't know what Nautilus is doing wrong to cause the
> > > warning to be triggered.
> > > 
> > > The big problem is that Nautilus runs in a mode where warnings drop into the
> > > debugger, and this causes me to drop into the debugger with the pointer
> > > grabbed. Then I have to clobber X with Ctrl-Alt-Backspace.
> > 
> > i have used a patch to gtk 1 which disables the calls to XGrabPointer
> > and XUnGrabPointer when an environment variable is set, and found it to
> > be very helpful in these cases.
> > 
> > owen, does this sound like something you'd be willing to put into gtk
> > 2.2?
> 
> Hmmm, I'm very much a fan of debugging with a second machine for debugging,
> though I know not everybody has that option all the time. (I tended
> to debug on a VT and switch from X before, now if I don't have a second
> machine, I'll use Xnest)

indeed - debugging with a remote emacs is a lot nicer, but carrying
around 2 laptops is annoying, and the ipaq screen is just a little too
small for this.

> I don't really like disabling pointer grabs because it causes all sorts
> of invariants that widgets can expect not to hold true. I suppose
> if code can survive without pointer grabs then it should work OK with
> them, but I can imagine all sorts of checks for "impossible" cases being
> added. 
> 
> Qt takes the environment variable idea one further and detects if you
> are running under gdb and disables pointer grabs unless you pass a special
> option; sort of neat, though perhaps a little overfancy.
> 
> Anyways, I don't have any fundemental objection, though I don't want patches
> that "fix" things that break run like this. I'd even be willing to take
> a patch for 2.0, in fact. (It probably should be done as a debug flag -
> GDK_DEBUG=nograb but people tend to have GTK+ compiled without --enable-debug...)

is there a mechanism for propogating debug flags from gtk to gdk? 
should i add a function gdk_disable_pointer_grabs() ?

jacob
-- 
"In fact, can you imagine anything more terrifying than a zombie clown?"
	-- moby



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