[patch] rxvt scrollbar fix and swap mouse buttons enhancement

mark robinson gmorkk at gmail.com
Wed May 30 08:43:07 CEST 2012


On Thu, May 24, 2012 at 5:30 PM, Marc Lehmann <schmorp at schmorp.de> wrote:
>
> On Tue, May 15, 2012 at 03:55:23PM +1000, mark robinson <gmorkk at gmail.com>
> wrote:
> > When I started using urxvt I though that the rxvt scrollbar looked a bit
> > strange - the trough seemed to be unbalanced.  I discovered that this is
> > because the shadow in the trough is upside down.
>
> Hi, we looked and looked (at the rxvt scrollstyle), but the shadow, even
> with
> a magnifier, looks correct as-is.
>
> Can you describe what you mean with "upside down shadow" a bit more?

Generally, shading on an graphical application assumes a light source
at the top left of the screen throwing shadows to the bottom right.
On raised features the top and left edges are light and the right and
bottom edges are dark.  However in the case a scrollbar the trough is
a sunken feature; therefore top and left edges are dark while right
and bottom edges are light.  The 'draw_shadow' method in
scrollbar-rxvt.C does not make this distinction.

I've attached a screenshot to illustrate the patch: the first row is
the standard urxvt for Ubuntu Lucid, the second is the latest source,
including the patch, with almost every option compiled in, and the
last is the same but with a cut down configuration (which for some
reason colours the trough in).  All six terminals are running in a VM
with no specific u/rxvt resources configured.

The patch is most noticeable when the scrollbar is on the right; even
more so when the trough is coloured in.  Incidentally, with the patch
in place urxvt looks like the original rxvt.

>
> > occasionally get an inadvertent scroll event.  This patch swaps the
> > middle
> > and right mouse buttons, controlled by a command line option "-/+smb"
> > (property swapMouseButtons) (default disabled).
>
> You can already swap mouse buttons e.g. with xmodmap, or by configuring
> your x-server.

That affects all applications and is therefore not a viable solution.
The patch I attached is identical to one I submitted for rxvt which
was incorporated into the cygwin version if not in the mainstream
itself.  But as I said, it's a personal itch which may be useful to
other folks, and which can be switched on or off.  Considering all the
options urxvt has already what is one more :-)

--
I'll do anything that doesn't require me to do anything.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot-1.png
Type: image/png
Size: 42953 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/rxvt-unicode/attachments/20120530/51e6b2e8/attachment-0001.png>


More information about the rxvt-unicode mailing list