aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 252e3ed7c18..1cfd7ef7601 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13334,9 +13334,6 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
13334{ 13334{
13335 Lisp_Object window = f->tab_bar_window; 13335 Lisp_Object window = f->tab_bar_window;
13336 struct window *w = XWINDOW (window); 13336 struct window *w = XWINDOW (window);
13337#ifndef HAVE_NS
13338 Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
13339#endif
13340 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 13337 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
13341 int hpos, vpos; 13338 int hpos, vpos;
13342 struct glyph *glyph; 13339 struct glyph *glyph;
@@ -13346,9 +13343,6 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
13346 int prop_idx; 13343 int prop_idx;
13347 bool close_p; 13344 bool close_p;
13348 enum draw_glyphs_face draw = DRAW_IMAGE_RAISED; 13345 enum draw_glyphs_face draw = DRAW_IMAGE_RAISED;
13349#ifndef HAVE_NS
13350 bool mouse_down_p;
13351#endif
13352 int rc; 13346 int rc;
13353 13347
13354 /* Function note_mouse_highlight is called with negative X/Y 13348 /* Function note_mouse_highlight is called with negative X/Y
@@ -13372,18 +13366,17 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
13372 13366
13373 clear_mouse_face (hlinfo); 13367 clear_mouse_face (hlinfo);
13374 13368
13369 bool mouse_down_p = false;
13375#ifndef HAVE_NS 13370#ifndef HAVE_NS
13376 /* Mouse is down, but on different tab-bar item? */ 13371 /* Mouse is down, but on different tab-bar item? */
13372 Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
13377 mouse_down_p = (gui_mouse_grabbed (dpyinfo) 13373 mouse_down_p = (gui_mouse_grabbed (dpyinfo)
13378 && f == dpyinfo->last_mouse_frame); 13374 && f == dpyinfo->last_mouse_frame);
13379 13375
13380 if (mouse_down_p && f->last_tab_bar_item != prop_idx) 13376 if (mouse_down_p && f->last_tab_bar_item != prop_idx)
13381 return; 13377 return;
13382 13378#endif
13383 draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED; 13379 draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED;
13384#else
13385 draw = DRAW_IMAGE_RAISED;
13386#endif /* HAVE_NS */
13387 13380
13388 /* If tab-bar item is not enabled, don't highlight it. */ 13381 /* If tab-bar item is not enabled, don't highlight it. */
13389 enabled_p = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_ENABLED_P); 13382 enabled_p = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_ENABLED_P);