From 8dc6624155eb61a9af519e69572bbd3785f79edc Mon Sep 17 00:00:00 2001 From: Jens Thoms Toerring Date: 2014年6月12日 23:31:51 +0200 Subject: Focus object bug fix --- ChangeLog | 5 +++++ lib/forms.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 96d072d..51b4cf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014年06月12日 Jens Thoms Toerring + + * 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 * 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; -- cgit v1.2.3

AltStyle によって変換されたページ (->オリジナル) /