diff options
| author | Po Lu | 2022-05-19 03:43:39 +0000 |
|---|---|---|
| committer | Po Lu | 2022-05-19 03:43:39 +0000 |
| commit | 4dfaefcffc987400a317b5ccf0c9bf00f7c84134 (patch) | |
| tree | 590fe0f71a6fae3fdec4d64fa80e20875f136be9 /src/haiku_support.h | |
| parent | bc604417f87f9fce865e70b3bc88b6bf2a8fd415 (diff) | |
| download | emacs-4dfaefcffc987400a317b5ccf0c9bf00f7c84134.tar.gz emacs-4dfaefcffc987400a317b5ccf0c9bf00f7c84134.zip | |
Fix race conditions processing frame fullscreen state on Haiku
* doc/lispref/frames.texi (Size Parameters): Remove note saying
Haiku doesn't support `fullwidth' and `fullboth'.
* src/haiku_support.cc (subset_windows, class EmacsWindow)
(Unparent, ParentTo): Stop calling old fullscreen functions.
(ClearFullscreen, FullscreenRectForMode, SetFullscreen): New
functions. Completely rewrite old zoom and fullscreen handling
code.
(Zoom): Send a ZOOM_EVENT and don't actually zoom.
(BWindow_zoom, EmacsWindow_make_fullscreen, EmacsWindow_unzoom):
Delete functions.
(be_set_window_fullscreen_mode): New function.
* src/haiku_support.h (struct haiku_zoom_event): Remove
`zoomed_p' parameter.
(enum haiku_fullscreen_mode): New enum. Update prototypes.
* src/haikufns.c (Fx_display_pixel_height): Return height
instead of width.
* src/haikuterm.c (haiku_make_fullscreen_consistent)
(haiku_read_socket, haiku_fullscreen): Adjust to always set zoom
and fullscreen in the main thread instead of the UI threads.
* src/haikuterm.h (struct haiku_output): Remove flag `zoomed_p'
and add field `fullscreen_mode'.
Diffstat (limited to 'src/haiku_support.h')
| -rw-r--r-- | src/haiku_support.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/haiku_support.h b/src/haiku_support.h index 14dd36e275a..0bfd027c0d3 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h | |||
| @@ -249,7 +249,6 @@ struct haiku_menu_bar_help_event | |||
| 249 | struct haiku_zoom_event | 249 | struct haiku_zoom_event |
| 250 | { | 250 | { |
| 251 | void *window; | 251 | void *window; |
| 252 | bool zoomed; | ||
| 253 | }; | 252 | }; |
| 254 | 253 | ||
| 255 | enum haiku_font_specification | 254 | enum haiku_font_specification |
| @@ -316,6 +315,15 @@ enum haiku_font_weight | |||
| 316 | HAIKU_MEDIUM = 2000, | 315 | HAIKU_MEDIUM = 2000, |
| 317 | }; | 316 | }; |
| 318 | 317 | ||
| 318 | enum haiku_fullscreen_mode | ||
| 319 | { | ||
| 320 | FULLSCREEN_MODE_NONE, | ||
| 321 | FULLSCREEN_MODE_WIDTH, | ||
| 322 | FULLSCREEN_MODE_HEIGHT, | ||
| 323 | FULLSCREEN_MODE_BOTH, | ||
| 324 | FULLSCREEN_MODE_MAXIMIZED, | ||
| 325 | }; | ||
| 326 | |||
| 319 | struct haiku_font_pattern | 327 | struct haiku_font_pattern |
| 320 | { | 328 | { |
| 321 | /* Bitmask indicating which fields are set. */ | 329 | /* Bitmask indicating which fields are set. */ |
| @@ -495,7 +503,6 @@ extern void BWindow_center_on_screen (void *); | |||
| 495 | extern void BWindow_change_decoration (void *, int); | 503 | extern void BWindow_change_decoration (void *, int); |
| 496 | extern void BWindow_set_tooltip_decoration (void *); | 504 | extern void BWindow_set_tooltip_decoration (void *); |
| 497 | extern void BWindow_set_avoid_focus (void *, int); | 505 | extern void BWindow_set_avoid_focus (void *, int); |
| 498 | extern void BWindow_zoom (void *); | ||
| 499 | extern void BWindow_set_size_alignment (void *, int, int); | 506 | extern void BWindow_set_size_alignment (void *, int, int); |
| 500 | extern void BWindow_sync (void *); | 507 | extern void BWindow_sync (void *); |
| 501 | extern void BWindow_send_behind (void *, void *); | 508 | extern void BWindow_send_behind (void *, void *); |
| @@ -623,8 +630,6 @@ extern void BAlert_delete (void *); | |||
| 623 | extern void EmacsWindow_parent_to (void *, void *); | 630 | extern void EmacsWindow_parent_to (void *, void *); |
| 624 | extern void EmacsWindow_unparent (void *); | 631 | extern void EmacsWindow_unparent (void *); |
| 625 | extern void EmacsWindow_move_weak_child (void *, void *, int, int); | 632 | extern void EmacsWindow_move_weak_child (void *, void *, int, int); |
| 626 | extern void EmacsWindow_make_fullscreen (void *, int); | ||
| 627 | extern void EmacsWindow_unzoom (void *); | ||
| 628 | 633 | ||
| 629 | extern void be_get_version_string (char *, int); | 634 | extern void be_get_version_string (char *, int); |
| 630 | extern int be_get_display_planes (void); | 635 | extern int be_get_display_planes (void); |
| @@ -690,6 +695,7 @@ extern status_t be_roster_launch (const char *, const char *, char **, | |||
| 690 | extern void be_get_window_decorator_dimensions (void *, int *, int *, int *, int *); | 695 | extern void be_get_window_decorator_dimensions (void *, int *, int *, int *, int *); |
| 691 | extern void be_get_window_decorator_frame (void *, int *, int *, int *, int *); | 696 | extern void be_get_window_decorator_frame (void *, int *, int *, int *, int *); |
| 692 | extern void be_send_move_frame_event (void *); | 697 | extern void be_send_move_frame_event (void *); |
| 698 | extern void be_set_window_fullscreen_mode (void *, enum haiku_fullscreen_mode); | ||
| 693 | 699 | ||
| 694 | extern void be_lock_window (void *); | 700 | extern void be_lock_window (void *); |
| 695 | extern void be_unlock_window (void *); | 701 | extern void be_unlock_window (void *); |