Hold the thread lock in a timer callback
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 15 Apr 2009 23:45:31 +0000 (07:45 +0800)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 15 Apr 2009 23:45:31 +0000 (07:45 +0800)
lib/gtk-contrib/psppire-sheet.c

index 33e7b47a0cce90cf7121ab275a78c965d3b66d0a..3db8fd5bd0b558878036f069fd9ef7a2d74478b3 100644 (file)
@@ -3802,6 +3802,8 @@ motion_timeout_callback (gpointer data)
   PsppireSheet *sheet = PSPPIRE_SHEET (data);
   gint x, y;
   gint row, column;
+
+  gdk_threads_enter ();
   gtk_widget_get_pointer (GTK_WIDGET (sheet), &x, &y);
 
   if ( psppire_sheet_get_pixel_info (sheet, x, y, &row, &column) )
@@ -3825,6 +3827,7 @@ motion_timeout_callback (gpointer data)
        }
     }
 
+  gdk_threads_leave ();
   return FALSE;
 }