From fd86dad21e270305553b3c74bd68c5b58f55cb69 Mon Sep 17 00:00:00 2001
From: Bill Spitzak
Fl::event_x() and Fl::event_y() are undefined if the -passed widget is not a mapped Fl_Window. Use -Fl::event_x_root() and Fl::event_y_root() instead.
+ + This is used when pop-up menu systems are active. Send all events to +the passed window no matter where the pointer or focus is (including +in other programs). The window does not have to be +shown() , this lets the handle() method of a +"dummy" window override all event handling and allows you to +map and unmap a complex set of windows (under both X and WIN32 +some window must be mapped because the system interface needs a +window id). +If grab() is on it will also affect show() of windows by +doing system-specific operations (on X it turns on +override-redirect). These are designed to make menus popup reliably +and faster on the system. +
To turn off grabbing do Fl::grab(0).
Be careful that your program does not enter an infinite loop while grab() is on. On X this will lock up your screen!
-The second function returns the current grab window, or NULL - if none.