mirror of
https://github.com/fltk/fltk.git
synced 2026-05-26 10:07:06 +08:00
Restore emojis support under recent macOS versions - cont'd (#1360)
This commit is contained in:
+3
-5
@@ -94,7 +94,6 @@ static BOOL through_drawRect = NO;
|
|||||||
static BOOL through_Fl_X_flush = NO;
|
static BOOL through_Fl_X_flush = NO;
|
||||||
static BOOL views_use_CA = NO; // YES means views are layer-backed, as on macOS 10.14 when linked with SDK 10.14
|
static BOOL views_use_CA = NO; // YES means views are layer-backed, as on macOS 10.14 when linked with SDK 10.14
|
||||||
static int im_enabled = -1;
|
static int im_enabled = -1;
|
||||||
static Fl_Widget *previous_focus = NULL; // restore lost focus when character palette window appears
|
|
||||||
// OS version-dependent pasteboard type names.
|
// OS version-dependent pasteboard type names.
|
||||||
// Some, but not all, versions of the 10.6 SDK for PPC lack the 3 symbols below (PR #761)
|
// Some, but not all, versions of the 10.6 SDK for PPC lack the 3 symbols below (PR #761)
|
||||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6) || defined(__POWERPC__)
|
#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6) || defined(__POWERPC__)
|
||||||
@@ -1439,8 +1438,9 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
|
|||||||
[nsw setLevel:NSNormalWindowLevel];
|
[nsw setLevel:NSNormalWindowLevel];
|
||||||
fixup_window_levels();
|
fixup_window_levels();
|
||||||
}
|
}
|
||||||
previous_focus = Fl::focus();
|
// Situations such as opening a character palette produce windowDidResignKey but
|
||||||
Fl::handle( FL_UNFOCUS, window);
|
// [NSApp keyWindow] remains set to the resigning window. In that case, don't send FL_UNFOCUS
|
||||||
|
if ([NSApp keyWindow] != nsw) Fl::handle(FL_UNFOCUS, window);
|
||||||
fl_unlock_function();
|
fl_unlock_function();
|
||||||
}
|
}
|
||||||
- (void)windowDidBecomeKey:(NSNotification *)notif
|
- (void)windowDidBecomeKey:(NSNotification *)notif
|
||||||
@@ -2889,9 +2889,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
|
|||||||
// insertText sent during handleEvent of a key without text cannot be processed in a single FL_KEYBOARD event.
|
// insertText sent during handleEvent of a key without text cannot be processed in a single FL_KEYBOARD event.
|
||||||
// Occurs with deadkey followed by non-text key
|
// Occurs with deadkey followed by non-text key
|
||||||
if (!in_key_event || !has_text_key) {
|
if (!in_key_event || !has_text_key) {
|
||||||
if (palette && !Fl::focus()) Fl::focus(previous_focus);
|
|
||||||
Fl::handle(FL_KEYBOARD, target);
|
Fl::handle(FL_KEYBOARD, target);
|
||||||
if (palette) previous_focus = NULL;
|
|
||||||
Fl::e_length = 0;
|
Fl::e_length = 0;
|
||||||
}
|
}
|
||||||
else need_handle = YES;
|
else need_handle = YES;
|
||||||
|
|||||||
Reference in New Issue
Block a user