From e683a2570be6f2e4f8defa4e7ee35a7d87f18918 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 1 May 2016 13:04:07 +0200 Subject: 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. --- src/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/window.h') diff --git a/src/window.h b/src/window.h index 84180c96a7d..1fd19369c33 100644 --- a/src/window.h +++ b/src/window.h @@ -793,7 +793,7 @@ wset_next_buffers (struct window *w, Lisp_Object val) || WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (W)) #if (defined (HAVE_WINDOW_SYSTEM) \ - && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \ + && ((defined (USE_TOOLKIT_SCROLL_BARS)) \ || defined (HAVE_NTGUI))) # define USE_HORIZONTAL_SCROLL_BARS true #else -- cgit v1.2.1