[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2c4e998592 1/2: Minor fixes for popup dialogs on macOS
From: |
Po Lu |
Subject: |
master 2c4e998592 1/2: Minor fixes for popup dialogs on macOS |
Date: |
Sat, 14 May 2022 09:36:06 -0400 (EDT) |
branch: master
commit 2c4e9985922b106389abf659d63d8dd721f2a9bc
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Minor fixes for popup dialogs on macOS
* nsmenu.m (pop_down_menu): Restore old hack for macOS.
([EmacsDialogPanel initWithTitle:isQuestion:]): Set command
title correctly.
---
src/nsmenu.m | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 1ebaca4e87..2219d6cf99 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1540,6 +1540,12 @@ pop_down_menu (void *arg)
{
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 ();
}
}
@@ -1847,10 +1853,11 @@ ns_popup_dialog (struct frame *f, Lisp_Object header,
Lisp_Object contents)
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;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 2c4e998592 1/2: Minor fixes for popup dialogs on macOS,
Po Lu <=