Re: Debugging Gtk/Gnome Applications



On Wed, Aug 05, 1998 at 05:12:08PM +0200, Michael Lausch wrote:
> How do you debug Gtk/Gnome applications? I've the problem that some
> widgets do a focus_grab after one mouseclick. If a breakpoint is set
> in the piece of code executing after this mouseclick, the whole
> scenario just stops. No more input is possible, and of cource you
> can't give the continue command to gdb. The only thing you can do is
> swuitch over to an ASCII console and kill the process.
> 
> I know how to make breakpoints with commands with gdb. All i need to
> know is if it is
> 
> 1) Which function call should i use to ungrab the
>    keyboard/mouse/focus? 
> 
> 2) Is this somewhat save? i know it will trigger weird behaviour for
>    some applications (double clicking).

well I solve it like this ... instead of a normal window, create a POPUP
one (override redirect) for your app window ... I have mouse follow focus
in fvwm ... so I keep the mouse on the xterm running the gdb and then slip
the mouse over to the app window without touching the root (you could use
sloppy focuse for this to be easier :) ... since the app window is overrride
redirect, it will leave focus on the xterm ... then when the breakpoint
comes ... the focus is still on the xterm window

George

-- 
------------------------------------------------------------------------------
George Lebl <jirka@5z.com> http://www.5z.com/jirka/
------------------------------------------------------------------------------
  The following implements RSA in perl and is illegal to export from the US:

          #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
          $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
          lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)



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