From: Po Lu Date: Tue, 1 Feb 2022 05:39:28 +0000 (+0000) Subject: Clean up Haiku display structures X-Git-Tag: emacs-29.0.90~2602 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=558c4dafa309445cd8ffc568303e2189f4effc03;p=emacs.git Clean up Haiku display structures * src/haikufns.c (haiku_set_parent_frame): Set `parent_desc' correctly. * src/haikuterm.h (C_FRAME, C_FONT, C_TERMINAL): (struct haiku_display_info): (struct haiku_output): Get rid of C_* preprocessor defines, since these files are no longer included in any way by C++ files. --- diff --git a/src/haikufns.c b/src/haikufns.c index 8f5dae1a2b9..eb736f1153d 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -418,13 +418,20 @@ haiku_set_parent_frame (struct frame *f, } if (!NILP (old_value)) - EmacsWindow_unparent (FRAME_HAIKU_WINDOW (f)); + { + EmacsWindow_unparent (FRAME_HAIKU_WINDOW (f)); + FRAME_OUTPUT_DATA (f)->parent_desc = NULL; + } if (!NILP (new_value)) { EmacsWindow_parent_to (FRAME_HAIKU_WINDOW (f), FRAME_HAIKU_WINDOW (p)); BWindow_set_offset (FRAME_HAIKU_WINDOW (f), f->left_pos, f->top_pos); + + /* This isn't actually used for anything, but makes the + `parent-id' parameter correct. */ + FRAME_OUTPUT_DATA (f)->parent_desc = FRAME_HAIKU_WINDOW (p); } fset_parent_frame (f, new_value); unblock_input (); diff --git a/src/haikuterm.h b/src/haikuterm.h index de302883e48..de607e6dc51 100644 --- a/src/haikuterm.h +++ b/src/haikuterm.h @@ -32,10 +32,6 @@ along with GNU Emacs. If not, see . */ #include "font.h" #include "systime.h" -#define C_FRAME struct frame * -#define C_FONT struct font * -#define C_TERMINAL struct terminal * - #define HAVE_CHAR_CACHE_MAX 65535 extern int popup_activated_p; @@ -64,7 +60,7 @@ struct haiku_display_info { /* Chain of all haiku_display_info structures. */ struct haiku_display_info *next; - C_TERMINAL terminal; + struct terminal *terminal; Lisp_Object name_list_element; Lisp_Object color_map; @@ -86,7 +82,6 @@ struct haiku_display_info int n_planes; int color_p; - Window root_window; Lisp_Object rdb; Emacs_Cursor vertical_scroll_bar_cursor; @@ -94,9 +89,9 @@ struct haiku_display_info Mouse_HLInfo mouse_highlight; - C_FRAME highlight_frame; - C_FRAME last_mouse_frame; - C_FRAME last_mouse_motion_frame; + struct frame *highlight_frame; + struct frame *last_mouse_frame; + struct frame *last_mouse_motion_frame; int last_mouse_motion_x; int last_mouse_motion_y; @@ -110,6 +105,8 @@ struct haiku_display_info double resx, resy; Time last_mouse_movement_time; + + Window root_window; }; struct haiku_output @@ -160,7 +157,7 @@ struct haiku_output int menu_bar_open_p; - C_FONT font; + struct font *font; int hourglass_p; uint32_t cursor_fg;