in reply to Mousebehaviour

You could, perhaps, "grab" the mouse pointer, so that your app will receive all mouse events. This *should* work under Win32 as well as Linux (unless using a particularly cruel & unusual window manager); the Tk::grab manual page describes this. (Common use for grabbing a pointer are menus or drag & drop; the application whence the dragged item is being moved maintains control of the pointer until the button is released, the source of some nasty annoyances if you click "File" in Netscape right when it decides to do a very slow DNS lookup.) You could then scan for e.g. a keypress or some other event not likely to be accidental to release your grab on the pointer.

Best of luck