]> git.eshelyaron.com Git - emacs.git/commit
Improve reliability of menu bar updates on Haiku
authorPo Lu <luangruo@yahoo.com>
Tue, 25 Jan 2022 11:19:20 +0000 (11:19 +0000)
committerPo Lu <luangruo@yahoo.com>
Tue, 25 Jan 2022 11:19:20 +0000 (11:19 +0000)
commit4d342f36a6764aaf33c76d48d19899be621dc59b
tree8b305d8ed3e6fb9ceb7a0a6e91bea6fd47da3d79
parent03c9257b119637703482e00816d054320b81f214
Improve reliability of menu bar updates on Haiku

* src/haiku_support.cc (class EmacsWindow): New fields
`menu_update_cv', `menu_update_mutex' and `menu_updated_p'.
(~EmacsWindow): Destroy cv and mutex.
(MenusBeginning): Release lock and wait for condition to be
become true.
(EmacsWindow_signal_menu_update_complete): New function.
* src/haiku_support.h (struct haiku_menu_bar_state_event): New
field `no_lock'.
* src/haikumenu.c (Fhaiku_menu_bar_open): Always update menu
bar.
* src/haikuterm.c (haiku_read_socket): Always update menu bar
and signal the window thread after update completion.
src/haiku_support.cc
src/haiku_support.h
src/haikumenu.c
src/haikuterm.c