Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gimp/ChangeLog,v
retrieving revision 1.7966.2.64
diff -u -r1.7966.2.64 ChangeLog
--- a/ChangeLog	18 Jun 2004 10:51:33 -0000	1.7966.2.64
+++ b/ChangeLog	19 Jun 2004 19:33:13 -0000
@@ -1,3 +1,9 @@
+2004-06-19  Robert Ögren  <gtk@roboros.com>
+
+	* app/widgets/gimptoolbox.c (toolbox_check_device): Don't check
+	for device change if the motion event is from the menu or if a
+	pointer button is pressed. Fixes bug #115774, at least on Windows.
+
 2004-06-18  Philip Lafleur  <plafleur@cvs.gnome.org>
 
 	* app/tools/gimptransformtool.c: reverted my previous change.
Index: app/widgets/gimptoolbox.c
===================================================================
RCS file: /cvs/gnome/gimp/app/widgets/gimptoolbox.c,v
retrieving revision 1.111
diff -u -r1.111 gimptoolbox.c
--- a/app/widgets/gimptoolbox.c	16 Jan 2004 23:18:23 -0000	1.111
+++ b/app/widgets/gimptoolbox.c	19 Jun 2004 19:33:13 -0000
@@ -830,6 +830,28 @@
 		      GdkEvent  *event,
 		      Gimp      *gimp)
 {
+  GtkWidget *source;
+
+  /* This function is called for motion events from the toolbox */
+  /* It is possible that the event was propagated from a widget that does
+     not want extension events and therefore always get core pointer events
+     which can cause a false switch to the core pointer device
+     (see bug #115774) */
+
+  /* Filter out events which have a button pressed, because core pointer
+     events can come from the toolbox_color_area when an extended device is
+     clicked and dragged slightly on the color area (drag'n'drop related?) */
+  if ((event->motion.state & (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK |
+                              GDK_BUTTON3_MASK | GDK_BUTTON4_MASK |
+                              GDK_BUTTON5_MASK)) != 0)
+    return FALSE; /* A button was down */
+
+  /* Filter out events which originate from menu items (the menu bar) */
+  source = gtk_get_event_widget(event);
+  if (source && GTK_IS_MENU_ITEM(source))
+    return FALSE; /* It was from the menu */
+
+  /* OK to go ahead and check for device change */
   gimp_devices_check_change (gimp, event);
 
   return FALSE;
