dont call Gtk.main_iteration not from the main thread as it triggers aborts
authorgc <gc>
Tue, 12 Apr 2005 22:04:21 +0000 (22:04 +0000)
committergc <gc>
Tue, 12 Apr 2005 22:04:21 +0000 (22:04 +0000)
bin/booh-gui

index 276efaf05dc6a8d0beb838984abaa586ed1aa904..46a6f5cb5bf80e7d22e7aa86a685aa6a2760c55a 100755 (executable)
@@ -136,14 +136,18 @@ def set_mousecursor(what, *widget)
 end
 def set_mousecursor_wait(*widget)
     set_mousecursor(Gdk::Cursor::WATCH, *widget)
-    Gtk.main_iteration while Gtk.events_pending?
+    if Thread.current == Thread.main
+        Gtk.main_iteration while Gtk.events_pending?
+    end
 end
 def set_mousecursor_normal(*widget)
     set_mousecursor(Gdk::Cursor::LEFT_PTR, *widget)
 end
 def push_mousecursor_wait(*widget)
-    $save_cursor = $current_cursor
-    set_mousecursor_wait(*widget)
+    if $current_cursor != Gdk::Cursor::WATCH
+        $save_cursor = $current_cursor
+        set_mousecursor_wait(*widget)
+    end
 end
 def pop_mousecursor(*widget)
     set_mousecursor($save_cursor || Gdk::Cursor::LEFT_PTR, *widget)