mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 03:15:21 +08:00
Add change necessary to support new class Fl_Native_Input, possibly as addon
The added if() statement's condition is always false in FLTK before addition to it of class Fl_Native_Input. Therefore, the present modification is effectless unless this new class is added to the library, either in its core or as an addon.
This commit is contained in:
@@ -2514,6 +2514,14 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
|
|||||||
- (BOOL)performKeyEquivalent:(NSEvent*)theEvent
|
- (BOOL)performKeyEquivalent:(NSEvent*)theEvent
|
||||||
{
|
{
|
||||||
//NSLog(@"performKeyEquivalent:");
|
//NSLog(@"performKeyEquivalent:");
|
||||||
|
/* The condition below is always false (and therefore the return statement doesn't run)
|
||||||
|
for the FLTK library unless it contains class Fl_Native_Input with which FLTK windows
|
||||||
|
may contain subviews inside their contentView. When such subview has focus, the condition
|
||||||
|
below becomes true.
|
||||||
|
*/
|
||||||
|
if ([[self window] firstResponder] != self) {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
fl_lock_function();
|
fl_lock_function();
|
||||||
cocoaKeyboardHandler(theEvent);
|
cocoaKeyboardHandler(theEvent);
|
||||||
BOOL handled;
|
BOOL handled;
|
||||||
|
|||||||
Reference in New Issue
Block a user