emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c1fbbc57a9: Fix race conditions processing zoom events on Haiku


From: Po Lu
Subject: master c1fbbc57a9: Fix race conditions processing zoom events on Haiku
Date: Fri, 20 May 2022 05:29:35 -0400 (EDT)

branch: master
commit c1fbbc57a9c850e2e8d756d0e6d7e967c652e870
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix race conditions processing zoom events on Haiku
    
    * src/haiku_support.cc (Zoom):
    * src/haiku_support.h (struct haiku_zoom_event): Include the
    current fullscreen mode in the event.
    
    * src/haikuterm.c (haiku_read_socket): Use that instead of the
    current frame's fullscreen mode.
---
 src/haiku_support.cc | 1 +
 src/haiku_support.h  | 1 +
 src/haikuterm.c      | 5 +----
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 3961d33e4d..33c68cbd46 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -1281,6 +1281,7 @@ public:
     struct haiku_zoom_event rq;
 
     rq.window = this;
+    rq.fullscreen_mode = fullscreen_mode;
     haiku_write (ZOOM_EVENT, &rq);
   }
 
diff --git a/src/haiku_support.h b/src/haiku_support.h
index b66486b1dc..163685572f 100644
--- a/src/haiku_support.h
+++ b/src/haiku_support.h
@@ -249,6 +249,7 @@ struct haiku_menu_bar_help_event
 struct haiku_zoom_event
 {
   void *window;
+  int fullscreen_mode;
 };
 
 enum haiku_font_specification
diff --git a/src/haikuterm.c b/src/haikuterm.c
index 731afd9d39..6401ea1233 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -3867,14 +3867,11 @@ haiku_read_socket (struct terminal *terminal, struct 
input_event *hold_quit)
          {
            struct haiku_zoom_event *b = buf;
            struct frame *f = haiku_window_to_frame (b->window);
-           struct haiku_output *output;
 
            if (!f)
              continue;
 
-           output = FRAME_OUTPUT_DATA (f);
-
-           if (output->fullscreen_mode == FULLSCREEN_MAXIMIZED)
+           if (b->fullscreen_mode == FULLSCREEN_MODE_MAXIMIZED)
              f->want_fullscreen = FULLSCREEN_NONE;
            else
              f->want_fullscreen = FULLSCREEN_MAXIMIZED;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]