Skip to content

Commit

Permalink
Merge pull request #78029 from bruvzg/macos_fix_popup_ime_focus
Browse files Browse the repository at this point in the history
[macOS] Fix IME focus in popup windows.
  • Loading branch information
akien-mga committed Jun 9, 2023
2 parents da68c70 + fe2d9e5 commit a5a2367
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions platform/macos/display_server_macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,7 @@
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];
Expand Down Expand Up @@ -2972,7 +2972,7 @@
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];
Expand Down
2 changes: 1 addition & 1 deletion platform/macos/godot_content_view.mm
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ - (BOOL)canBecomeKeyView {
}

DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
return !wd.no_focus && !wd.is_popup;
return !wd.no_focus;
}

- (BOOL)acceptsFirstResponder {
Expand Down
2 changes: 1 addition & 1 deletion platform/macos/godot_window.mm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ - (BOOL)canBecomeKeyWindow {
}

DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
return !wd.no_focus && !wd.is_popup;
return !wd.no_focus;
}

- (BOOL)canBecomeMainWindow {
Expand Down

0 comments on commit a5a2367

Please sign in to comment.