Commit d244e9bf authored by Jan Djärv's avatar Jan Djärv
Browse files

* nsterm.m (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless

needed (Bug#18757).

Fixes: debbugs:18993
parent 86b1c771
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
* nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA. * nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA.
(run): Ditto. Only use non-system event loop if OSX version is (run): Ditto. Only use non-system event loop if OSX version is
exactly 10.9 (Bug#18993). 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> 2014-11-07 Michael Albinus <michael.albinus@gmx.de>
......
...@@ -3802,6 +3802,7 @@ overwriting cursor (usually when cursor on a tab) */ ...@@ -3802,6 +3802,7 @@ overwriting cursor (usually when cursor on a tab) */
int top, left, height, width, sb_width, sb_left; int top, left, height, width, sb_width, sb_left;
EmacsScroller *bar; EmacsScroller *bar;
BOOL fringe_extended_p; BOOL fringe_extended_p;
BOOL update_p = YES;
/* optimization; display engine sends WAY too many of these.. */ /* optimization; display engine sends WAY too many of these.. */
if (!NILP (window->vertical_scroll_bar)) if (!NILP (window->vertical_scroll_bar))
...@@ -3816,6 +3817,7 @@ overwriting cursor (usually when cursor on a tab) */ ...@@ -3816,6 +3817,7 @@ overwriting cursor (usually when cursor on a tab) */
} }
else else
view->scrollbarsNeedingUpdate--; view->scrollbarsNeedingUpdate--;
update_p = NO;
} }
} }
...@@ -3869,6 +3871,7 @@ overwriting cursor (usually when cursor on a tab) */ ...@@ -3869,6 +3871,7 @@ overwriting cursor (usually when cursor on a tab) */
bar = [[EmacsScroller alloc] initFrame: r window: win]; bar = [[EmacsScroller alloc] initFrame: r window: win];
wset_vertical_scroll_bar (window, make_save_ptr (bar)); wset_vertical_scroll_bar (window, make_save_ptr (bar));
update_p = YES;
} }
else else
{ {
...@@ -3881,10 +3884,12 @@ overwriting cursor (usually when cursor on a tab) */ ...@@ -3881,10 +3884,12 @@ overwriting cursor (usually when cursor on a tab) */
if (oldRect.origin.x != r.origin.x) if (oldRect.origin.x != r.origin.x)
ns_clear_frame_area (f, sb_left, top, width, height); ns_clear_frame_area (f, sb_left, top, width, height);
[bar setFrame: r]; [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 (); unblock_input ();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment