[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Consistent mouse and scrollbar behavior in X?



Hello Brian,

> Clicking on scrollbars does different things with different applications. In Emacs, the following used to be standard:
> 
> - left click: one screenful down
> - right click: one screenful up
> - middle click: jump to where you clicked

Better than that, the left and right click scroll by an amount
proportional to how far down the bar you click it. Viewed another way,
left click moves the line from the cursor position to the top of the
window, right click moves the top line to the cursor position. It is
(was) really well thought out.

[...]

> I did some web searching to try to fix this. I found how to move my
> scrollbar in emacs back over to the left, instead of on the right
> (set-scroll-bar-mode 'left), but I haven't found a way to get my old
> mouse behavior back in emacs,

You need to rebuild emacs to achieve that. This note from
/usr/share/doc/emacs23-common/README.Debian.gz is the key:
  If you prefer the old-style, non-toolkit scrollbars, just edit
  debian/rules to add --without-toolkit-scrollbars where indicated and
  rebuild.

The splendid Debian Reference has a guide to rebuilding packages:
http://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_porting_a_package_to_the_stable_system
 - Make sure you set the deb-src line to the same release as you're
using (because you're not doing a backport).
 - Before the build step, add the following lines in debian/rules at the
appropriate places:
confflags_x += --without-toolkit-scroll-bars
confflags_lucid += --without-toolkit-scroll-bars

Allow plenty of time for the build. My notes say 42min to build
emacs23 on a 3GHz P4.

>  much less make it standard across all X programs. Is this possible?

Ideally scroll bar behaviour would be a window manager function, but
as you've observed, it seems to be built into each application.

[...]

> Thanks for any thoughts or suggestions.

Did you know that xterm has the same scrollbar behaviour? Unlike every
other terminal emulator that I'm aware of.

-- 
Cheers,
Clive


Reply to: