On Apr 26, 2007, at 4:32 PM, Konstantin wrote:

> Hey,
> I have a window (created with FLUID) and want to execute a task if  
> the focus switches back to the window (mouse or also the keyboard).
>
> Currently it is implemented:
>
> My window contains a widget, in this part I'm listening to the  
> Fl::focus() event method. If it gets null and switches back  
> (contains something), i will know, that focus has been switched  
> back. So, at this time i will do my calculations. But I only works,  
> if you move the mouse over this particular widget otherwise I won't  
> notify that the focus has been switched.

You can listen for the FL_FOCUS message in your window instead of  
your widget. That should be sent as soon as you click anywhere in the  
main window. You might also consider the FL_ENTER event which is sent  
when the mouse crosses the window without activating it.

----
http://robowerk.com/


_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to