Index: app/display/gimpdisplayshell-callbacks.c =================================================================== RCS file: /cvs/gnome/gimp/app/display/gimpdisplayshell-callbacks.c,v retrieving revision 1.206 diff -u -p -r1.206 gimpdisplayshell-callbacks.c --- app/display/gimpdisplayshell-callbacks.c 17 Jul 2003 22:30:12 -0000 1.206 +++ app/display/gimpdisplayshell-callbacks.c 25 Jul 2003 17:59:58 -0000 @@ -553,6 +553,11 @@ gimp_display_shell_canvas_tool_events (G gdisp); button_press_before_focus = TRUE; + + /* we expect a FOCUS_IN event to follow, but can't rely + * on it, so force one + */ + gdk_window_focus (canvas->window, time); } /* ignore new mouse events */ @@ -591,6 +596,8 @@ gimp_display_shell_canvas_tool_events (G NULL, NULL, time); } + gdk_keyboard_grab (canvas->window, FALSE, time); + /* save the current modifier state because tools don't get * key events while BUTTON1 is down */ @@ -710,6 +717,7 @@ gimp_display_shell_canvas_tool_events (G } } + gdk_keyboard_ungrab (time); gdk_pointer_ungrab (time); /* restore the tool's modifier state because it didn't get @@ -1225,6 +1233,8 @@ gimp_display_shell_hruler_button_press ( GDK_BUTTON_RELEASE_MASK, NULL, NULL, event->time); + gdk_keyboard_grab (shell->canvas->window, FALSE, event->time); + gimp_move_tool_start_hguide (active_tool, gdisp); } } @@ -1268,6 +1278,8 @@ gimp_display_shell_vruler_button_press ( GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, NULL, event->time); + + gdk_keyboard_grab (shell->canvas->window, FALSE, event->time); gimp_move_tool_start_vguide (active_tool, gdisp); }