| author | Jens Thoms Toerring <jt@toerring.de> | 2014年06月12日 23:31:51 +0200 |
|---|---|---|
| committer | Jens Thoms Toerring <jt@toerring.de> | 2014年06月12日 23:31:51 +0200 |
| commit | 8dc6624155eb61a9af519e69572bbd3785f79edc (patch) | |
| tree | 97d23cc938f37e2105e313491bebe834e2abc5aa | |
| parent | 77ad3770f1bcb22a1ef2cbbd577b924bb06b5a01 (diff) | |
| download | xforms-8dc6624155eb61a9af519e69572bbd3785f79edc.tar.gz | |
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/forms.c | 5 |
@@ -1,3 +1,8 @@ +2014年06月12日 Jens Thoms Toerring <jt@toerring.de> + + * lib/forms.c: an object that isn't visible could become the + focus object, which was an insidious bug:-( + 2014年06月07日 Jens Thoms Toerring <jt@toerring.de> * Lots of minor corrections diff --git a/lib/forms.c b/lib/forms.c index 965f574..2bbd233 100644 --- a/lib/forms.c +++ b/lib/forms.c @@ -1371,9 +1371,12 @@ fl_show_form_window( FL_FORM * form ) if ( obj->objclass == FL_FORMBROWSER ) fl_redraw_object( obj ); + /* Check if there's an object we can make the object that has the focus, + it must be an input object and be active and visible */ + if ( ! form->focusobj ) for ( obj = form->first; obj; obj = obj->next ) - if ( obj->input && obj->active ) + if ( obj->input && obj->active && obj->visible ) { fl_set_focus_object( form, obj ); break; |