aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-02-01 05:39:28 +0000
committerPo Lu2022-02-01 05:39:28 +0000
commit558c4dafa309445cd8ffc568303e2189f4effc03 (patch)
treea88f6d16207d0c95b634e39812556e74f489d7de /src
parentcfbb6359cebb6c0465bf132ab5a88c095373c4d0 (diff)
downloademacs-558c4dafa309445cd8ffc568303e2189f4effc03.tar.gz
emacs-558c4dafa309445cd8ffc568303e2189f4effc03.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/haikufns.c9
-rw-r--r--src/haikuterm.h17
2 files changed, 15 insertions, 11 deletions
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,
418 } 418 }
419 419
420 if (!NILP (old_value)) 420 if (!NILP (old_value))
421 EmacsWindow_unparent (FRAME_HAIKU_WINDOW (f)); 421 {
422 EmacsWindow_unparent (FRAME_HAIKU_WINDOW (f));
423 FRAME_OUTPUT_DATA (f)->parent_desc = NULL;
424 }
422 if (!NILP (new_value)) 425 if (!NILP (new_value))
423 { 426 {
424 EmacsWindow_parent_to (FRAME_HAIKU_WINDOW (f), 427 EmacsWindow_parent_to (FRAME_HAIKU_WINDOW (f),
425 FRAME_HAIKU_WINDOW (p)); 428 FRAME_HAIKU_WINDOW (p));
426 BWindow_set_offset (FRAME_HAIKU_WINDOW (f), 429 BWindow_set_offset (FRAME_HAIKU_WINDOW (f),
427 f->left_pos, f->top_pos); 430 f->left_pos, f->top_pos);
431
432 /* This isn't actually used for anything, but makes the
433 `parent-id' parameter correct. */
434 FRAME_OUTPUT_DATA (f)->parent_desc = FRAME_HAIKU_WINDOW (p);
428 } 435 }
429 fset_parent_frame (f, new_value); 436 fset_parent_frame (f, new_value);
430 unblock_input (); 437 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 <https://www.gnu.org/licenses/>. */
32#include "font.h" 32#include "font.h"
33#include "systime.h" 33#include "systime.h"
34 34
35#define C_FRAME struct frame *
36#define C_FONT struct font *
37#define C_TERMINAL struct terminal *
38
39#define HAVE_CHAR_CACHE_MAX 65535 35#define HAVE_CHAR_CACHE_MAX 65535
40 36
41extern int popup_activated_p; 37extern int popup_activated_p;
@@ -64,7 +60,7 @@ struct haiku_display_info
64{ 60{
65 /* Chain of all haiku_display_info structures. */ 61 /* Chain of all haiku_display_info structures. */
66 struct haiku_display_info *next; 62 struct haiku_display_info *next;
67 C_TERMINAL terminal; 63 struct terminal *terminal;
68 64
69 Lisp_Object name_list_element; 65 Lisp_Object name_list_element;
70 Lisp_Object color_map; 66 Lisp_Object color_map;
@@ -86,7 +82,6 @@ struct haiku_display_info
86 int n_planes; 82 int n_planes;
87 int color_p; 83 int color_p;
88 84
89 Window root_window;
90 Lisp_Object rdb; 85 Lisp_Object rdb;
91 86
92 Emacs_Cursor vertical_scroll_bar_cursor; 87 Emacs_Cursor vertical_scroll_bar_cursor;
@@ -94,9 +89,9 @@ struct haiku_display_info
94 89
95 Mouse_HLInfo mouse_highlight; 90 Mouse_HLInfo mouse_highlight;
96 91
97 C_FRAME highlight_frame; 92 struct frame *highlight_frame;
98 C_FRAME last_mouse_frame; 93 struct frame *last_mouse_frame;
99 C_FRAME last_mouse_motion_frame; 94 struct frame *last_mouse_motion_frame;
100 95
101 int last_mouse_motion_x; 96 int last_mouse_motion_x;
102 int last_mouse_motion_y; 97 int last_mouse_motion_y;
@@ -110,6 +105,8 @@ struct haiku_display_info
110 double resx, resy; 105 double resx, resy;
111 106
112 Time last_mouse_movement_time; 107 Time last_mouse_movement_time;
108
109 Window root_window;
113}; 110};
114 111
115struct haiku_output 112struct haiku_output
@@ -160,7 +157,7 @@ struct haiku_output
160 157
161 int menu_bar_open_p; 158 int menu_bar_open_p;
162 159
163 C_FONT font; 160 struct font *font;
164 161
165 int hourglass_p; 162 int hourglass_p;
166 uint32_t cursor_fg; 163 uint32_t cursor_fg;