On 2 Jun 2011, at 08:53, seekinghost wrote: > I am writing a window widget (e.g. Fl_Double_Window) and I would like it to > be able to handle keyboard events, such as FL_KEYDOWN and FL_KEYUP, while I > am resizing it. > > I wrote my own 'handle' function for a class that inherits Fl_Double_Window > class and tried to see which events that the function is called with while > window is being resized. The events are either FL_UNFOCUS or FL_NO_EVENT, > along with FL_MOVE and FL_LEAVE. > > My handle function makes the call "focus(this)" if it receives an FL_UNFOCUS > event and using the function Fl::focus(), I can confirm that the window > widget has the keyboard focus. > > So, is it possible to receive and handle keyboard events while a window is > being resized? Do you have any suggestions?
That tends to be platform specific, sad to say, so may or may not work depending on what host platform and so forth... For example, on Windows, event delivery tends to be blocked whilst a window is resizing (at least up until XP - maybe they sorted that in Vista/7 ? I don't know, though I doubt it) so you can't reliably process any events then. Not actually sure what OSX does... It may be the same, actually. Yup, just did a crude test, looks like events are stalled during a resize... On other hosts, it may very well depend on what actual window manager is running. Hmm, OK, you may need to give us a bit more detail then! -- Ian _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

