diff options
| author | Jan Djärv | 2014-11-08 20:40:17 +0100 |
|---|---|---|
| committer | Jan Djärv | 2014-11-08 20:40:17 +0100 |
| commit | d244e9bf0369c630386efbdc69ea123ae1289844 (patch) | |
| tree | 2e7e9b28f2afc30fe3cbb3d09066ed9ffacc95e7 /src | |
| parent | 86b1c771e14efcc98f8fe07510a4238bf94ced7b (diff) | |
| download | emacs-d244e9bf0369c630386efbdc69ea123ae1289844.tar.gz emacs-d244e9bf0369c630386efbdc69ea123ae1289844.zip | |
* nsterm.m (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
needed (Bug#18757).
Fixes: debbugs:18993
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/nsterm.m | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1544df0da8c..7b595b5f9e9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | * nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA. | 3 | * nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA. |
| 4 | (run): Ditto. Only use non-system event loop if OSX version is | 4 | (run): Ditto. Only use non-system event loop if OSX version is |
| 5 | exactly 10.9 (Bug#18993). | 5 | exactly 10.9 (Bug#18993). |
| 6 | (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless | ||
| 7 | needed (Bug#18757). | ||
| 6 | 8 | ||
| 7 | 2014-11-07 Michael Albinus <michael.albinus@gmx.de> | 9 | 2014-11-07 Michael Albinus <michael.albinus@gmx.de> |
| 8 | 10 | ||
diff --git a/src/nsterm.m b/src/nsterm.m index 190698db1fe..605baff00b2 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -3802,6 +3802,7 @@ ns_set_vertical_scroll_bar (struct window *window, | |||
| 3802 | int top, left, height, width, sb_width, sb_left; | 3802 | int top, left, height, width, sb_width, sb_left; |
| 3803 | EmacsScroller *bar; | 3803 | EmacsScroller *bar; |
| 3804 | BOOL fringe_extended_p; | 3804 | BOOL fringe_extended_p; |
| 3805 | BOOL update_p = YES; | ||
| 3805 | 3806 | ||
| 3806 | /* optimization; display engine sends WAY too many of these.. */ | 3807 | /* optimization; display engine sends WAY too many of these.. */ |
| 3807 | if (!NILP (window->vertical_scroll_bar)) | 3808 | if (!NILP (window->vertical_scroll_bar)) |
| @@ -3816,6 +3817,7 @@ ns_set_vertical_scroll_bar (struct window *window, | |||
| 3816 | } | 3817 | } |
| 3817 | else | 3818 | else |
| 3818 | view->scrollbarsNeedingUpdate--; | 3819 | view->scrollbarsNeedingUpdate--; |
| 3820 | update_p = NO; | ||
| 3819 | } | 3821 | } |
| 3820 | } | 3822 | } |
| 3821 | 3823 | ||
| @@ -3869,6 +3871,7 @@ ns_set_vertical_scroll_bar (struct window *window, | |||
| 3869 | 3871 | ||
| 3870 | bar = [[EmacsScroller alloc] initFrame: r window: win]; | 3872 | bar = [[EmacsScroller alloc] initFrame: r window: win]; |
| 3871 | wset_vertical_scroll_bar (window, make_save_ptr (bar)); | 3873 | wset_vertical_scroll_bar (window, make_save_ptr (bar)); |
| 3874 | update_p = YES; | ||
| 3872 | } | 3875 | } |
| 3873 | else | 3876 | else |
| 3874 | { | 3877 | { |
| @@ -3881,10 +3884,12 @@ ns_set_vertical_scroll_bar (struct window *window, | |||
| 3881 | if (oldRect.origin.x != r.origin.x) | 3884 | if (oldRect.origin.x != r.origin.x) |
| 3882 | ns_clear_frame_area (f, sb_left, top, width, height); | 3885 | ns_clear_frame_area (f, sb_left, top, width, height); |
| 3883 | [bar setFrame: r]; | 3886 | [bar setFrame: r]; |
| 3887 | update_p = YES; | ||
| 3884 | } | 3888 | } |
| 3885 | } | 3889 | } |
| 3886 | 3890 | ||
| 3887 | [bar setPosition: position portion: portion whole: whole]; | 3891 | if (update_p) |
| 3892 | [bar setPosition: position portion: portion whole: whole]; | ||
| 3888 | unblock_input (); | 3893 | unblock_input (); |
| 3889 | } | 3894 | } |
| 3890 | 3895 | ||