On 23.03.2011 21:21, Greg Ercolano wrote:

>> FL::focus() is in Fl.cxx, so it's shared for all platforms.
>
>       Ah, interesting.
>
>       So it might be a regression or something in the core cross
>       platform stuff.
>
>       I'm not very knowledgeable about the core event delivery stuff.
>       I'm more of a widget programmer, and don't have a full understanding
>       of how event delivery 'should' work.
>
>       However, I might be able sleuth down a code regression through svn
>       if you've narrowed it down to a few lines of code. Albrecht's also
>       pretty handy with this.

There's one possible regression I know of, related to a few open bug
reports, and maybe this is one of them. The problematic change that
led to the regression (if we can call it so - that's not yet completely
investigated) is the change in FL/Fl_Widget.H in svn -r 7788 in an
attempt to fix STR #2420. This changed take_focus(), thus it may be
related here too.

I suggest to try to revert this and see if this changes the behavior
you are seeing. You can do this:

$ svn diff -c 7788 FL/Fl_Widget.H | patch -p0 -R

or apply the following patch reversed (-R):

Index: FL/Fl_Widget.H
===================================================================
--- FL/Fl_Widget.H      (Revision 7787)
+++ FL/Fl_Widget.H      (Revision 7788)
@@ -752,7 +752,9 @@
        && visible()) but is faster.
        \retval 0 if the widget takes no events
     */
-  unsigned int takesevents() const {return 
!(flags_&(INACTIVE|INVISIBLE|OUTPUT));}
+  unsigned int takesevents() const {
+    return !output() && active_r() && visible_r();
+  }

    /**
        Checks if the widget value changed since the last callback.

[end of patch]
Note: one line may wrap.

Does this change the window focus behavior?

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

Reply via email to