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

[XaraXtreme-dev] Debugging drags



I've made /some/ progress in ascertaining how to debug a drag.

In essence, if control drops back to your favourite IDE (kdevelop or
whatever) during a drag, it captures the mouse. This calls,
gdk_pointer_grab, which calls XGrabPointer, which does what it
is meant to (freezes the mouse message queue for all other
apps). This would include your favourite IDE.

The workaround I have at the moment is to run a nested X server
to run Xtreme in, when debugging drags.

So, e.g.:

 # Run Xnest without authentication (coz I can't get auth
 # to work right now) - you should see a big empty "screen"
 # which will be a nested X server
 Xnest -ac :1 &

 # A window manager in the X server will be useful to
 # drag windows about
 metacity --display=:1 &

  # Test camelot works fine
 (DISPLAY=:1 ; path/to/camelot/XaraLX) &

Then in kdevelop, when you want to debug drag nastiness,
ensure the variable "DISPLAY" is set to ":1" in the run
environment, and you will see Camelot appear in the
nested X server. I've tested this, and it works.

If you know how to (easily) fix the auth issue, I'd
be grateful.

I am presuming it's also possible in Ubuntu to run
more than one "classic" XServers (i.e. two real X
Servers both using the same graphics h/w),
and have CTRL-ALT-F7/F8 switch between them. It should
then be possible to debug a program in a completely
separate X environment, though no doubt the Xauth
problem needs tweaking. This has the disadvantage
that you won't (obviously) be able to simultaneously
see kdevelop/gdb and the application you are
debugging (though you can flick between them). I haven't
yet tested this one.

Alex