Focus object bug fix - xforms.git - xforms

index : xforms.git
xforms
summary refs log tree commit diff
diff options
context:
space:
mode:
authorJens Thoms Toerring <jt@toerring.de>2014年06月12日 23:31:51 +0200
committerJens Thoms Toerring <jt@toerring.de>2014年06月12日 23:31:51 +0200
commit8dc6624155eb61a9af519e69572bbd3785f79edc (patch)
tree97d23cc938f37e2105e313491bebe834e2abc5aa
parent77ad3770f1bcb22a1ef2cbbd577b924bb06b5a01 (diff)
downloadxforms-8dc6624155eb61a9af519e69572bbd3785f79edc.tar.gz
Focus object bug fix
Diffstat
-rw-r--r--ChangeLog 5
-rw-r--r--lib/forms.c 5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 96d072d..51b4cf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
generated by cgit v1.2.3 (git 2.46.0) at 2025年11月24日 10:16:18 +0000

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