summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-03-11 03:35:16 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-03-11 03:35:16 +0000
commit27a4fceee84cfffe4a080171c8c81e7e0deab72d (patch)
tree3cd6d482159424c63297de4ba71bd49f25d9c8bc /src
parentChange tolerance to threshold (diff)
downloadinkscape-27a4fceee84cfffe4a080171c8c81e7e0deab72d.tar.gz
inkscape-27a4fceee84cfffe4a080171c8c81e7e0deab72d.zip
display busy cursor while filling
(bzr r2598)
Diffstat (limited to 'src')
-rw-r--r--src/flood-context.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index 8be742021..24c948241 100644
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -755,11 +755,22 @@ static gint sp_flood_context_item_handler(SPEventContext *event_context, SPItem
static gint sp_flood_context_root_handler(SPEventContext *event_context, GdkEvent *event)
{
gint ret = FALSE;
+ SPDesktop *desktop = event_context->desktop;
+
switch (event->type) {
case GDK_BUTTON_PRESS:
if ( event->button.button == 1 ) {
+
+ // set "busy" cursor
+ GdkCursor *waiting = gdk_cursor_new(GDK_WATCH);
+ gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, waiting);
+
sp_flood_do_flood_fill(event_context, event);
+ // restore cursor when done
+ gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, event_context->cursor);
+ gdk_cursor_unref(waiting);
+
ret = TRUE;
}
break;