]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix support of 'mouse-highlight' on X (bug#78218)
authorGerd Möllmann <gerd.moellmann@gmail.com>
Sun, 4 May 2025 06:17:27 +0000 (08:17 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 10 May 2025 08:49:34 +0000 (10:49 +0200)
* src/xterm.c (handle_one_xevent): Fix comparison with tool-bar
and tab-bar window.

(cherry picked from commit 6ccfc8977821d02e8d589c801e6cad2e74ab699b)

src/xterm.c

index 249916cf95452ed2750aeff4f973612df1c05628..03064acbe6cdfbd049605834e777f19875b05cfb 100644 (file)
@@ -20201,13 +20201,14 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
       /* If mouse-highlight is an integer, input clears out
         mouse highlighting.  */
-      if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight)
-         && (f == 0
+      if (!hlinfo->mouse_face_hidden
+         && FIXNUMP (Vmouse_highlight)
+         && (f == NULL
+             || (!EQ (f->tab_bar_window, hlinfo->mouse_face_window)
 #if ! defined (USE_GTK)
-             || !EQ (f->tool_bar_window, hlinfo->mouse_face_window)
+                 && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)
 #endif
-             || !EQ (f->tab_bar_window, hlinfo->mouse_face_window))
-         )
+                )))
         {
          mouse_frame = hlinfo->mouse_face_mouse_frame;