Re: Debugging after mouse pointer grabbed



Sorry, I should have been more clear: the question was not "how do I
debug ______ in gdb when the mouse pointer stays grabbed?" (actually,
I've had to do this a few times w/ nautilus using multiple machines),
the question is "how do I make an IDE that does not force users to do this".

>> We're running into a problem with Eclipse (an IDE that's using GTK2)
>> when a breakpoint is hit in a section where the process has the mouse
>> pointer grabbed (for example, during a drag). The process breaks, so the
>> mouse pointer is never released and so no mouse clicking can be done.
>> Specifically one can no longer use the debugger to fix the problem, at
>> least not using the mouse. Any bright ideas or suggestions?

>GDK_DEBUG=no_grabs is the obvious solution, but it only works with
>GTK+ built with --enable-debug.

>I wouldn't be completely opposed to doing the Qt thing and >automatically
>disabling grabs when running under gdb. 
>
>(Note: we can't take a patch for this from someone who looks at the Qt
>source to see how it does it.)

But having somebody else read the source and write a description of how
it works is ok, right?

>But then again, that doesn't really solve the problem for language
>bindings like Python, Java, etc, so maybe we just need to honor a
>separate environment variable for turning off grabbing.

This would work better with Eclipse, though presumably the above could
be kludged to work with eclipse as well as gdb. What are the downsides
of not having the mouse grabbed? Will this mess up debugging of certain
operations? (and if no.... why do we ever grab the mouse? so I'm
presuming the answer is "yes" *wink*)

Is there some way we could have programs normally grab the mouse, but
automatically release it when a breakpoint is hit? (say, have a GTK call
the debugger can activate that releases any mouse grab).

-Seth



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