summaryrefslogtreecommitdiff
path: root/src/haikumenu.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-04-18 00:50:15 +0000
committerPo Lu <luangruo@yahoo.com>2022-04-18 00:50:15 +0000
commit29bf6e64fdad648642a79915d63fe543fdeaff8b (patch)
tree22a4e52b8057a4a70ad0fd04e0122a982bfbd063 /src/haikumenu.c
parent4b2b3c45d39721a60f8ed63c2a3e3ec9ff7e5004 (diff)
downloademacs-29bf6e64fdad648642a79915d63fe543fdeaff8b.tar.gz
Fix Haiku menu bars when redisplay happens immediately after activation
* src/haiku_support.cc (MessageReceived): Make `REPLAY_MENU_BAR' messages synchronous. (be_replay_menu_bar_event): Return whether or not the menu bar really opened. * src/haiku_support.h: Update prototypes. * src/haikumenu.c (haiku_activate_menubar): Immediately activate menu bar after replaying event.
Diffstat (limited to 'src/haikumenu.c')
-rw-r--r--src/haikumenu.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/haikumenu.c b/src/haikumenu.c
index 46dde6496bb..54ee3f160f6 100644
--- a/src/haikumenu.c
+++ b/src/haikumenu.c
@@ -783,11 +783,17 @@ haiku_activate_menubar (struct frame *f)
if (FRAME_OUTPUT_DATA (f)->saved_menu_event)
{
block_input ();
- be_replay_menu_bar_event (FRAME_HAIKU_MENU_BAR (f),
- FRAME_OUTPUT_DATA (f)->saved_menu_event);
+ rc = be_replay_menu_bar_event (FRAME_HAIKU_MENU_BAR (f),
+ FRAME_OUTPUT_DATA (f)->saved_menu_event);
xfree (FRAME_OUTPUT_DATA (f)->saved_menu_event);
FRAME_OUTPUT_DATA (f)->saved_menu_event = NULL;
unblock_input ();
+
+ if (!rc)
+ return;
+
+ FRAME_OUTPUT_DATA (f)->menu_bar_open_p = 1;
+ popup_activated_p += 1;
}
else
{