X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/d294c01f599fb45accd879fabc0d23a6daa4acef..5553563924453df2e3c5bf011bf5b7527172b2f6:/lisp/scroll-bar.el diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el index aea8c8e72f..493a271cf2 100644 --- a/lisp/scroll-bar.el +++ b/lisp/scroll-bar.el @@ -1,6 +1,7 @@ -;;; scroll-bar.el --- window system-independent scroll bar support. +;;; scroll-bar.el --- window system-independent scroll bar support -;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994, 1995, 1999, 2000, 2001 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: hardware @@ -286,26 +287,13 @@ EVENT should be a scroll bar click." ;;; Tookit scroll bars. -;; Due to its event handling, Emacs is currently not able to handle Xt -;; timeouts which toolkit scroll bars use to implement auto-repeat. -;; As a workaround, we start a timer whenever a scroll bar action -;; occurs, and remove it again when are notified that the user no -;; longer interacts with the scroll bar. The timer function gives Xt -;; the chance to call Xt timeout functions. - -(defvar scroll-bar-timer nil - "Timer running while scroll bar is active.") - (defun scroll-bar-toolkit-scroll (event) (interactive "e") (let* ((end-position (event-end event)) (window (nth 0 end-position)) (part (nth 4 end-position)) before-scroll) - (cond ((eq part 'end-scroll) - (when scroll-bar-timer - (cancel-timer scroll-bar-timer) - (setq scroll-bar-timer nil))) + (cond ((eq part 'end-scroll)) (t (with-current-buffer (window-buffer window) (setq before-scroll point-before-scroll)) @@ -335,9 +323,6 @@ EVENT should be a scroll bar click." ((eq part 'handle) (scroll-bar-drag-1 event)))) (sit-for 0) - (unless scroll-bar-timer - (setq scroll-bar-timer - (run-with-timer 0.1 0.1 'xt-process-timeouts))) (with-current-buffer (window-buffer window) (setq point-before-scroll before-scroll)))))) @@ -346,7 +331,7 @@ EVENT should be a scroll bar click." ;;;; Bindings. ;;; For now, we'll set things up to work like xterm. -(cond (x-toolkit-scroll-bars-p +(cond ((and (boundp 'x-toolkit-scroll-bars) x-toolkit-scroll-bars) (global-set-key [vertical-scroll-bar mouse-1] 'scroll-bar-toolkit-scroll)) (t