FLTK logo

Re: [fltk/fltk] Make class Fl_Simple_Terminal refuse the focus (Issue #365)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Make class Fl_Simple_Terminal refuse the focus (Issue #365) Albrecht Schlosser Jan 11, 2022  
 

OK, to clarify, we have two possible situations after one of the two suggested patches:

  1. Manolo's patch rejects the FL_FOCUS event and disables setting the focus to the widget by TAB navigation and by the initial focus widget selection. If you click into the terminal widget Fl_Text_Display handles the FL_PUSH event and calls Fl::focus(this) which sets the focus despite the fact that it would be rejected by normal TAB navigation (FL_FOCUS returns 0). This is what Fl_Text_Display always does and it works here too.

  2. My suggestion to use visible_focus(0) or the equivalent clear_visible_focus() should IMHO work as expected but does not (I tested it). This is obviously due to the fact that Fl::focus(Fl_Widget*) does NOT set the focus widget if VISIBLE_FOCUS has been disabled, and this is the reason why I opened issue #366.

Summary: I would prefer using clear_visible_focus() which doesn't work currently. If we could fix this (see #366) then I'd prefer my proposal. Otherwise we could still use Manolo's suggestion which is generally not wrong (IMO) but it would introduce a handle() method in the derived class which we could avoid.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/365/1010294931@github.com>

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.