Re: Avoiding grabs whilst debugging




"Gregory A. McLean" <gregm@randomc.com> writes:

> -----BEGIN PGP SIGNED MESSAGE-----
> 
> 
> > >  I've introduced a --no-grab runtime option for gdk (similar to --sync,
> > >  etc) which asks gdk to ignore gdk_pointer_grab. This is so that you
> > >  can use gdb and not have your display freeze up if you hit a
> > >  breakpoint or whatever whilst the pointer is grabbed by your program.
> > 
> > Umm, this is useful to have, but is it really necessary?  When such a
> > situation arises, I usually run the program inside an Xnest window,
> > thus avoiding the `toplevel' server grab.
> 
> IMHO, Yes. Why you might ask? Well running Xnest + GDB + EFench + any other
> tools needed to debug said app == OOODLES of resources..
> That may be ok for people with unlimited budjets and resources...

Just to point out another way of handling this problem -

Most window managers have hot keys available to switch the focus,
and these are not affected by a pointer grab. So you can use that
to get to the XTerm running GDB and do stuff there. (e.g., the
default fvwm configuration is Alt-F7 and Alt-F8)

(If you were running an X based debugger, that needed mouse input,
then this wouldn't work as well, of course)

Regards,
                                        Owen



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