W dniu 10 lutego 2010 22:33 użytkownik bulia byak <buliabyak@...400...> napisał:
I just fixed middle button panning and rubberband-zoom by a change in node-tool.cpp. I don't quite understand how it could have worked for you before my change :)
switch (event->type) { case GDK_MOTION_NOTIFY: { + if (event->button.button == 1) { + combine_motion_events(desktop->canvas, event->motion, 0);
Uh, that only works by accident, and it breaks the highlighting of paths. Why do you want to check for a field in the button structure, if what you've got is the motion structure? In other words you have a GdkEventMotion but access it as a GdkEventButton.
typedef struct { GdkEventType type; GdkWindow *window; gint8 send_event; guint32 time; gdouble x; gdouble y; gdouble *axes; guint state; guint button; GdkDevice *device; gdouble x_root, y_root; } GdkEventButton;
typedef struct { GdkEventType type; GdkWindow *window; gint8 send_event; guint32 time; gdouble x; gdouble y; gdouble *axes; guint state; gint16 is_hint; GdkDevice *device; gdouble x_root, y_root; } GdkEventMotion;
It looks like this check actually checks is_hint. is_hint is always false because as far as I know we do not use GDK_POINTER_MOTION_HINT_MASK. What you're looking for is probably changing "return true;" at the end of this case to "return false;", so that the motion event is always passed further up. I did this in 9081. Now that I see it I also have no idea how it worked for me before.
Regards, Krzysztof