diff options
author | Po Lu <luangruo@yahoo.com> | 2022-04-17 08:13:49 +0000 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-04-17 08:14:06 +0000 |
commit | 5bc3ed492bffa962ef326387f2476b66442a006c (patch) | |
tree | 7b1d6a91027af6d3d832ac7045fe6d200b75190c /src/haikufns.c | |
parent | 9a7430ce8414f68de1022b3b6068ba60e8cd87cf (diff) | |
download | emacs-5bc3ed492bffa962ef326387f2476b66442a006c.tar.gz |
Fix race conditions waiting for menu bar resize events on Haiku
* src/haikufns.c (haiku_create_frame, haiku_create_tip_frame):
Clear `wait_for_event_type'.
(haiku_set_menu_bar_lines): Clean up coding style.
* src/haikuterm.c (haiku_wait_for_event): New function.
(haiku_read_socket): Implement waiting for MENU_BAR_RESIZE
events.
* src/haikuterm.h (struct haiku_output): New field
`wait_for_event_type'.
Diffstat (limited to 'src/haikufns.c')
-rw-r--r-- | src/haikufns.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/haikufns.c b/src/haikufns.c index b040e6cafaa..151874e26fd 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -635,6 +635,7 @@ haiku_create_frame (Lisp_Object parms) f->output_method = output_haiku; f->output_data.haiku = xzalloc (sizeof *f->output_data.haiku); + f->output_data.haiku->wait_for_event_type = -1; fset_icon_name (f, gui_display_get_arg (dpyinfo, parms, Qicon_name, "iconName", "Title", @@ -946,6 +947,7 @@ haiku_create_tip_frame (Lisp_Object parms) counts etc. */ f->output_method = output_haiku; f->output_data.haiku = xzalloc (sizeof *f->output_data.haiku); + f->output_data.haiku->wait_for_event_type = -1; f->tooltip = true; fset_icon_name (f, Qnil); @@ -1264,9 +1266,11 @@ haiku_set_override_redirect (struct frame *f, Lisp_Object new_value, static void haiku_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) { + int nlines; + if (FRAME_TOOLTIP_P (f)) return; - int nlines; + if (TYPE_RANGED_FIXNUMP (int, value)) nlines = XFIXNUM (value); else |