]> git.eshelyaron.com Git - emacs.git/commitdiff
Slightly fix mouse-highlight processing on Haiku
authorPo Lu <luangruo@yahoo.com>
Sun, 6 Mar 2022 10:42:33 +0000 (10:42 +0000)
committerPo Lu <luangruo@yahoo.com>
Sun, 6 Mar 2022 10:42:33 +0000 (10:42 +0000)
* src/haikuterm.c (haiku_read_socket): If no corresponding frame
was found for a keyboard event, clear mouse highlight.

src/haikuterm.c

index c44b350c5831d6289d96cc6a7dff00f964a41206..633e87fd4352a080eaf6a58cd086ebf094ff11b2 100644 (file)
@@ -2780,8 +2780,6 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
            struct haiku_key_event *b = buf;
            Mouse_HLInfo *hlinfo = &x_display_list->mouse_highlight;
            struct frame *f = haiku_window_to_frame (b->window);
-           if (!f)
-             continue;
 
            /* If mouse-highlight is an integer, input clears out
               mouse highlighting.  */
@@ -2795,6 +2793,9 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
                need_flush = 1;
              }
 
+           if (!f)
+             continue;
+
            inev.code = b->keysym ? b->keysym : b->multibyte_char;
 
            if (b->keysym)