aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xdisp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 97ba6721781..436153b2bae 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13861,12 +13861,17 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
13861 13861
13862 bool mouse_down_p = false; 13862 bool mouse_down_p = false;
13863#ifndef HAVE_NS 13863#ifndef HAVE_NS
13864 /* Mouse is down, but on different tab-bar item? */ 13864 /* Mouse is down, but on different tab-bar item? Or alternatively,
13865 the mouse might've been pressed somewhere we don't know about,
13866 and then have moved onto the tab bar. In this case,
13867 last_tab_bar_item is -1, so we DTRT and behave like other
13868 programs by displaying the item as sunken. */
13865 Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); 13869 Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
13866 mouse_down_p = (gui_mouse_grabbed (dpyinfo) 13870 mouse_down_p = (gui_mouse_grabbed (dpyinfo)
13867 && f == dpyinfo->last_mouse_frame); 13871 && f == dpyinfo->last_mouse_frame);
13868 13872
13869 if (mouse_down_p && f->last_tab_bar_item != prop_idx) 13873 if (mouse_down_p && f->last_tab_bar_item != prop_idx
13874 && f->last_tab_bar_item != -1)
13870 return; 13875 return;
13871#endif 13876#endif
13872 draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED; 13877 draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED;