Simon, Raphael Simon: Thank you for the Havoc Pennington/X-11 Consortium documentation As Raphael points out, the GDK/XInputExtension glacis is where interesting affairs transpire. Raphael wrote: >> I think that #10498 occurs because of a combination of two things: >> - A bug in GTK+ (in the interaction between XInput and the core >> pointer) breaks the semantics of the pointer grab, so the >> application (Gimp) receives some events that should never occur >> while the pointer is grabbed. I suspect this. I'm not at the stage where I actually believe this. >> - For the ArtPad II under XFree86, another bug in XFree shadows the >> GTK+ bug and causes other strange things to happen. Can't say anything useful here, since I am testing without XFree86 (Setup uses Xsgi) >> If this theory is correct, then the Gimp 1.2 should require a new >> release of GTK+. :-( I am rather leaning toward this sad conclusion. However, at Gimp level, we never check gdk_pointer_grab() to confirm we have the pointer, and that is suspect [example: app/rect_select.c line 173] Pennington tells us we should (See 10.6.2 GTK/Gnome App Dev, first reference in Simon's mail] Also, we limit grab to the current window only, not to child windows (like menu panes?) so we can lose control of focus, no? When the pen point (simulated left mouse button) is already down and a grab has been made from rect_select, then here's what watch points at gdk_pointer grab report: (Tablet device enabled and active) (Rect Selection already made) (Cursor in selection) (pen point goes down...) only asking for grab on current window V 0 gdk_pointer_grab(window = 0x107bcb50, owner_events = 0, event_mask = 552, confine_to = 0x0, cursor = 0x0, time = 42275620) ["gdk.c":694, 0x0400cdec] 1 rect_select_button_press(tool = 0x10777d10, bevent = 0x103e79c8, gdisp_ptr = 0x107bb6c8) ["rect_select.c":173, 0x101e3244] 2 gdisplay_canvas_events(canvas = 0x107b6320, event = 0x103e79c8) ["disp_callbacks.c":281, 0x100b0878] <rest of stack snipped...> gdk_xgrab_window = 0x107bcb50 <-- gimp image display window return_val = 0 <-- grab was a success (Floating selection being dragged, then "right mouse button" simulated depressed on pen body) Menu pane asks for self & child V > 0 gdk_pointer_grab(window = 0x1087a308, owner_events = 1, event_mask = 13060, confine_to = 0x0, cursor = 0x108bb570, time = 42288140) ["gdk.c":694, 0x0400cdec] 1 gtk_menu_popup(menu = 0x1065ed70, parent_menu_shell = 0x0, parent_menu_item = 0x0, func = 0x0, data = 0x0, button = 3, activate_time = 42288140) ["gtkmenu.c":493, 0x5fed58bc] 2 gdisplay_canvas_events(canvas = 0x107b6320, event = 0x103e79c8) <rest of stack snipped...> gdk_xgrab_window = 0x1087a308 <-- menu pane window (child of gimp image window, yes ???) return_val = 0 <-- menu pane gets its pointer grab... The hunt continues Garry