summaryrefslogtreecommitdiff
path: root/lisp/scroll-bar.el
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2016-05-01 13:04:07 +0200
committerMartin Rudalics <rudalics@gmx.at>2016-05-01 13:04:07 +0200
commite683a2570be6f2e4f8defa4e7ee35a7d87f18918 (patch)
tree0b749572bb70a6222d333d932bda7a29b18e5729 /lisp/scroll-bar.el
parent80a1e3b9b58aaeb71913737e07bb305d9eb54437 (diff)
downloademacs-e683a2570be6f2e4f8defa4e7ee35a7d87f18918.tar.gz
Implement horizontal scroll bars on NS
* lisp/scroll-bar.el (horizontal-scroll-bars-available-p): Remove NS check. * lisp/term/ns-win.el: Remove custom NS scroll-bar handlers and bind scroll-bar mouse clicks to standard handlers. * src/nsterm.h (EmacsScroller): Add 'horizontal' property and rename pixel_height to pixel_length. * src/nsterm.m (x_set_window_size): Remove left-hand scroll-bar code. It caused scroll-bars to be over-drawn and the best working solution appears to be complete removal. (ns_set_horizontal_scroll_bar): Rewrite to handle horizontal scrollers correctly. (ns_set_vertical_scroll_bar): Set width to actual scroller width. (setFrame): Handle horizontal case. (dealloc): Handle horizontal case. (judge): Handle horizontal case. (setPosition): Rename pixel_height to pixel_length. (sendScrollEventAtLoc): Handle horizontal case. (mouseDown): Handle horizontal case and general tidy up of code. (mouseDragged): Handle horizontal case. Call sendScrollEventAtLoc with absolute pixel size instead of ratio. * src/window.h: Remove NS check.
Diffstat (limited to 'lisp/scroll-bar.el')
-rw-r--r--lisp/scroll-bar.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index 5cfa2c4353b..838f9bf80cd 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -148,8 +148,7 @@ created in the future."
"Return non-nil when horizontal scroll bars are available on this system."
(and (display-graphic-p)
(boundp 'x-toolkit-scroll-bars)
- x-toolkit-scroll-bars
- (not (eq (window-system) 'ns))))
+ x-toolkit-scroll-bars))
(define-minor-mode horizontal-scroll-bar-mode
"Toggle horizontal scroll bars on all frames (Horizontal Scroll Bar mode).