]> git.eshelyaron.com Git - emacs.git/commitdiff
* nsterm.m (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 8 Nov 2014 19:40:17 +0000 (20:40 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 8 Nov 2014 19:40:17 +0000 (20:40 +0100)
needed (Bug#18757).

Fixes: debbugs:18993
src/ChangeLog
src/nsterm.m

index 1544df0da8c1c00a581b9d81eadf677d2c7740fc..7b595b5f9e9fcffc1fc268570f76bdf4846cee5e 100644 (file)
@@ -3,6 +3,8 @@
        * nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA.
        (run): Ditto.  Only use non-system event loop if OSX version is
        exactly 10.9 (Bug#18993).
+       (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
+       needed (Bug#18757).
 
 2014-11-07  Michael Albinus  <michael.albinus@gmx.de>
 
index 190698db1fe4eba5b9ff62772e8a77ae15a343ad..605baff00b257083b2d5614ca283516b3517dc84 100644 (file)
@@ -3802,6 +3802,7 @@ ns_set_vertical_scroll_bar (struct window *window,
   int top, left, height, width, sb_width, sb_left;
   EmacsScroller *bar;
   BOOL fringe_extended_p;
+  BOOL update_p = YES;
 
   /* optimization; display engine sends WAY too many of these.. */
   if (!NILP (window->vertical_scroll_bar))
@@ -3816,6 +3817,7 @@ ns_set_vertical_scroll_bar (struct window *window,
             }
           else
             view->scrollbarsNeedingUpdate--;
+          update_p = NO;
         }
     }
 
@@ -3869,6 +3871,7 @@ ns_set_vertical_scroll_bar (struct window *window,
 
       bar = [[EmacsScroller alloc] initFrame: r window: win];
       wset_vertical_scroll_bar (window, make_save_ptr (bar));
+      update_p = YES;
     }
   else
     {
@@ -3881,10 +3884,12 @@ ns_set_vertical_scroll_bar (struct window *window,
           if (oldRect.origin.x != r.origin.x)
               ns_clear_frame_area (f, sb_left, top, width, height);
           [bar setFrame: r];
+          update_p = YES;
         }
     }
 
-  [bar setPosition: position portion: portion whole: whole];
+  if (update_p)
+    [bar setPosition: position portion: portion whole: whole];
   unblock_input ();
 }