emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 5c4195f: * src/xdisp.c (note_tab_bar_highlight): Si


From: Paul Eggert
Subject: [Emacs-diffs] master 5c4195f: * src/xdisp.c (note_tab_bar_highlight): Simplify HAVE_NS ifdefs.
Date: Sun, 13 Oct 2019 15:55:35 -0400 (EDT)

branch: master
commit 5c4195fd364fe3b2d0fb591fb04f5be2652b810f
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    * src/xdisp.c (note_tab_bar_highlight): Simplify HAVE_NS ifdefs.
---
 src/xdisp.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 252e3ed..1cfd7ef 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13334,9 +13334,6 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
 {
   Lisp_Object window = f->tab_bar_window;
   struct window *w = XWINDOW (window);
-#ifndef HAVE_NS
-  Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
-#endif
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
   int hpos, vpos;
   struct glyph *glyph;
@@ -13346,9 +13343,6 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
   int prop_idx;
   bool close_p;
   enum draw_glyphs_face draw = DRAW_IMAGE_RAISED;
-#ifndef HAVE_NS
-  bool mouse_down_p;
-#endif
   int rc;
 
   /* 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)
 
   clear_mouse_face (hlinfo);
 
+  bool mouse_down_p = false;
 #ifndef HAVE_NS
   /* Mouse is down, but on different tab-bar item?  */
+  Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
   mouse_down_p = (gui_mouse_grabbed (dpyinfo)
                  && f == dpyinfo->last_mouse_frame);
 
   if (mouse_down_p && f->last_tab_bar_item != prop_idx)
     return;
-
+#endif
   draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED;
-#else
-  draw = DRAW_IMAGE_RAISED;
-#endif /* HAVE_NS */
 
   /* If tab-bar item is not enabled, don't highlight it.  */
   enabled_p = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_ENABLED_P);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]