slow drags




Hi all,

When I try the `dnd' test with testgtk (0.99.4) I'm finding that there
is quite a lag between the movement of the mouse and the position of
the dragged icon. (That is, if I move the mouse haphazardly across the
screen the icon will belatedly trace out the path of the mouse until
it catches up, rather than keeping pace).  Now, this is on an
X-terminal, and I vaguely remember (but can't check right now) that the
performance is much better on my home machine (not networked) but I'm
reluctant just to blame the Xserver for this, since moving the icons
using the window manager gives perfectly adequate response.

This is relevent to the code I'm writing now: a port of a
half-finished file-manager I was writing in Qt to Gtk--. I'm not using
Gtk's dnd implementation (I have my own) but I have the same problem:
dragging icons is very sluggish. The best solution I have so far is to
ignore the mouse coordinates that GdkEventMotion provides me with and
get them directly myself. This allows the icon to move exactly where
it should be, but the delays are propagated, so after the mouse button
is released a whole bunch of motion_notify's are still queued which
arrive before the button_release.

It seems to me that this behaviour is great if the mouse is simulating
a drawing tool, but not so good otherwise. Does anyone have any
suggestions? I'm still coming to grips with gtk/gtk--, so I'm hoping
I'm just missing something obvious here, since it did work fine with
Qt:)

Thanks, Rupert.

___________________________________________________________________
Rupert Littlewood                      "When I grow up, I'm going to 
rupert@maths.usyd.edu.au              Bovine University" -- R.Wiggum
http://www.maths.usyd.edu.au:8000/u/rupert/



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