Merge pull request #78029 from bruvzg/macos_fix_popup_ime_focus

[macOS] Fix IME focus in popup windows.
This commit is contained in:
Rémi Verschelde 2023-06-09 11:08:06 +02:00
commit a5a23678c4
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 4 additions and 4 deletions

View File

@ -2338,7 +2338,7 @@ void DisplayServerMacOS::show_window(WindowID p_id) {
popup_open(p_id);
if ([wd.window_object isMiniaturized]) {
return;
} else if (wd.no_focus || wd.is_popup) {
} else if (wd.no_focus) {
[wd.window_object orderFront:nil];
} else {
[wd.window_object makeKeyAndOrderFront:nil];
@ -2972,7 +2972,7 @@ void DisplayServerMacOS::window_set_flag(WindowFlags p_flag, bool p_enabled, Win
if ([wd.window_object isVisible]) {
if ([wd.window_object isMiniaturized]) {
return;
} else if (wd.no_focus || wd.is_popup) {
} else if (wd.no_focus) {
[wd.window_object orderFront:nil];
} else {
[wd.window_object makeKeyAndOrderFront:nil];

View File

@ -342,7 +342,7 @@
}
DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
return !wd.no_focus && !wd.is_popup;
return !wd.no_focus;
}
- (BOOL)acceptsFirstResponder {

View File

@ -65,7 +65,7 @@
}
DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
return !wd.no_focus && !wd.is_popup;
return !wd.no_focus;
}
- (BOOL)canBecomeMainWindow {