diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-07-19 02:20:47 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-07-19 02:20:47 +0000 |
| commit | c177c9bb692566d493a61687e4e8049d760b87cf (patch) | |
| tree | 48292eccc1afc45e4fbfd1acc15700568d640214 /src/desktop.cpp | |
| parent | rearrange to fix the first keypress event being lost with options.savewindowg... (diff) | |
| download | inkscape-c177c9bb692566d493a61687e4e8049d760b87cf.tar.gz inkscape-c177c9bb692566d493a61687e4e8049d760b87cf.zip | |
a better way to make cursor change immediate; of course this trick is not documented by gdk, I just found it serendipitously when googling for some other code
(bzr r6357)
Diffstat (limited to 'src/desktop.cpp')
| -rw-r--r-- | src/desktop.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp index 932d79ff2..0a7f353a8 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1275,14 +1275,9 @@ void SPDesktop::setWaitingCursor() GdkCursor *waiting = gdk_cursor_new(GDK_WATCH); gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(this))->window, waiting); gdk_cursor_unref(waiting); + // GDK needs the flush for the cursor change to take effect + gdk_flush(); waiting_cursor = true; - - // Stupidly broken GDK cannot just set the new cursor right now - it needs some main loop iterations for that - // Since setting waiting_cursor is usually immediately followed by some Real Work, we must run the iterations here - // CAUTION: iterations may redraw, and redraw may be interrupted, so you cannot assume that anything is the same - // after the call to setWaitingCursor as it was before - while( Gtk::Main::events_pending() ) - Gtk::Main::iteration(); } void SPDesktop::clearWaitingCursor() |
