* nsmenu.m (pop_down_menu): Restore old hack for macOS.
([EmacsDialogPanel initWithTitle:isQuestion:]): Set command
title correctly.
{
popup_activated_flag = 0;
[panel close];
+ /* For some reason this is required on macOS, or the selected
+ frame gets the keyboard focus but doesn't become
+ highlighted. */
+#ifdef NS_IMPL_COCOA
+ [[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow];
+#endif
discard_menu_items ();
}
}
if (title_string)
[title setStringValue:
[NSString stringWithUTF8String: title_string]];
- else if (is_question)
- [title setStringValue: @"Question"];
+
+ if (is_question)
+ [command setStringValue: @"Question"];
else
- [title setStringValue: @"Information"];
+ [command setStringValue: @"Information"];
return self;
}