diff --git a/src/event-context.cpp b/src/event-context.cpp
index f3a402eebe9f42f833290f432d37f40116190c7c..76fe7263683df89dbb1d21efdd29d48363b912fb 100644 (file)
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
}
gdk_window_set_cursor(w->window, ec->cursor);
}
}
gdk_window_set_cursor(w->window, ec->cursor);
}
+ ec->desktop->waiting_cursor = false;
}
/**
}
/**
@@ -405,7 +406,7 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context,
NR::Point const motion_w(event->motion.x, event->motion.y);
NR::Point const moved_w( motion_w - button_w );
NR::Point const motion_w(event->motion.x, event->motion.y);
NR::Point const moved_w( motion_w - button_w );
- event_context->desktop->scroll_world(moved_w);
+ event_context->desktop->scroll_world(moved_w, true); // we're still scrolling, do not redraw
ret = TRUE;
}
} else if (zoom_rb) {
ret = TRUE;
}
} else if (zoom_rb) {
@@ -434,15 +435,19 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context,
xp = yp = 0;
if (within_tolerance && (panning || zoom_rb)) {
zoom_rb = 0;
xp = yp = 0;
if (within_tolerance && (panning || zoom_rb)) {
zoom_rb = 0;
+ if (panning) {
+ panning = 0;
+ sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
+ event->button.time);
+ }
NR::Point const event_w(event->button.x, event->button.y);
NR::Point const event_dt(desktop->w2d(event_w));
desktop->zoom_relative_keep_point(event_dt,
(event->button.state & GDK_SHIFT_MASK) ? 1/zoom_inc : zoom_inc);
desktop->updateNow();
NR::Point const event_w(event->button.x, event->button.y);
NR::Point const event_dt(desktop->w2d(event_w));
desktop->zoom_relative_keep_point(event_dt,
(event->button.state & GDK_SHIFT_MASK) ? 1/zoom_inc : zoom_inc);
desktop->updateNow();
- }
- if (panning == event->button.button) {
- panning = 0;
ret = TRUE;
ret = TRUE;
+ } else if (panning == event->button.button) {
+ panning = 0;
sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
event->button.time);
sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
event->button.time);
@@ -453,15 +458,16 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context,
NR::Point const motion_w(event->button.x, event->button.y);
NR::Point const moved_w( motion_w - button_w );
event_context->desktop->scroll_world(moved_w);
NR::Point const motion_w(event->button.x, event->button.y);
NR::Point const moved_w( motion_w - button_w );
event_context->desktop->scroll_world(moved_w);
-
desktop->updateNow();
desktop->updateNow();
+ ret = TRUE;
} else if (zoom_rb == event->button.button) {
zoom_rb = 0;
NR::Maybe<NR::Rect> const b = Inkscape::Rubberband::get()->getRectangle();
Inkscape::Rubberband::get()->stop();
} else if (zoom_rb == event->button.button) {
zoom_rb = 0;
NR::Maybe<NR::Rect> const b = Inkscape::Rubberband::get()->getRectangle();
Inkscape::Rubberband::get()->stop();
- if (b != NR::Nothing() && !within_tolerance) {
- desktop->set_display_area(b.assume(), 10);
+ if (b && !within_tolerance) {
+ desktop->set_display_area(*b, 10);
}
}
+ ret = TRUE;
}
break;
case GDK_KEY_PRESS:
}
break;
case GDK_KEY_PRESS: