On Mon, 2006-08-28 at 16:05 -0300, bulia byak wrote:
On 8/28/06, MenTaLguY <mental@...3...> wrote:
The standard Gtk approach is to use "motion hints"; unfortunately they appear to be broken for extended input devices (e.g. tablets) in some widely available versions of Gtk.
What are these hints, and how can they help visualize the changing path when you drag a node? I'd think it's not possible without actually drawing this path in some way, which only Inkscape can do (and does, typically with minimum or no lad, though without updating repr during drag).
The idea behind motion hints is to let you do "live" updates without a whole bunch of motion events piling up. You set the MOTION_HINT in the widget event mask, and Gtk will coalesce the motion events into a single one with the is_hint flag set (and no position data).
Subsequently, it will continue coalescing motion events until gdk_window_get_pointer is called to get the current mouse position. When using motion hints, SPCanvas will automatically call gdk_window_get_pointer and set the motion event position to it when MOTION_HINT is set.
That way, you only get a new motion event every display update, rather than a whole bunch of events piling up while you're busy repainting.
Unfortunately, for some versions of Gtk, it appears that calling gtk_window_get_pointer() is broken with respect to motion hints for tablets. You might remember this from that can't-drag-with-tablet bug... :/
-mental