]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix race conditions processing zoom events on Haiku
authorPo Lu <luangruo@yahoo.com>
Fri, 20 May 2022 09:28:19 +0000 (09:28 +0000)
committerPo Lu <luangruo@yahoo.com>
Fri, 20 May 2022 09:29:08 +0000 (09:29 +0000)
* 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
src/haiku_support.h
src/haikuterm.c

index 3961d33e4d7f02aae443cd0162389cfe1b2f10d5..33c68cbd46527f2563033ed67d5e29ac258e353b 100644 (file)
@@ -1281,6 +1281,7 @@ public:
     struct haiku_zoom_event rq;
 
     rq.window = this;
+    rq.fullscreen_mode = fullscreen_mode;
     haiku_write (ZOOM_EVENT, &rq);
   }
 
index b66486b1dce6f7eed6a0f3c853fff53ed0a4893e..163685572f6766d1820c561291e348214ba0237d 100644 (file)
@@ -249,6 +249,7 @@ struct haiku_menu_bar_help_event
 struct haiku_zoom_event
 {
   void *window;
+  int fullscreen_mode;
 };
 
 enum haiku_font_specification
index 731afd9d39470316f7d48d667f1f85586cb1317f..6401ea12330b0ea2510a0e0e865aabcd92418b33 100644 (file)
@@ -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;