proportional panning

David De La Harpe Golden david.delaharpe.golden at gmail.com
Sat Jun 27 20:41:54 PDT 2009


2009/6/8 Matthias Hopf <mhopf at suse.de>:

> Yes, you're right - I forgot how it was on the Amiga. Shame on me.
> You're more than welcome to add this to the panning code.
>

Turns out doing the panning itself is the easy bit, there's extending the randr
protocol to include a panning mode field and xrandr command line tool to
grok it too to worry about...

Attached please find an initial patch anyway, though only settable
from xorg.conf
as it stands owing to the above, just adds another field to the end of
the lengthy
"Panning" option string:
   /b (or nothing - default) for border push,
   /l for the proportional panning.

Obviously, without an extended protocol and xrandr tool, you can't
change the panning mode at run time, however you can adjust
the panning area, tracking area and borders without having to restart
the server.

e.g.

Section "Monitor"
...
   Option "PreferredMode" "1600x1200"
   Option "Panning"  "3200x2400+0+0/3200x2400+0+0/160/120/160/120/l"
...
EndSection

(Don't forget to set "Virtual" large enough to cover
the whole area if necessary if you're trying the patch...)

Note that the border values are still used and relevant in the proportional
code path:
1. as you get close to the edge of the crtc it can be nice to
have unpanned zones to facilitate window placement, it made
sense to reuse the border fields, use positive
border values to have such zones, as in the first example below.

2. it turns out negative border values also allow a potentially quite
useful effect with the proportional panning mode:
Say you had two 1024x768 monitors, one above the other.  You want
a larger virtual desktop, say 2048x3072.   Well, you can e.g. do the
following, and as you pan around the edges will line up on
both heads at all times, which is neat:

Section "Monitor"
   Identifier   "Monitor0"
...
   Option "PreferredMode" "1024x768"
   Option "Panning"  "2048x3072+0+0/2048x3072+0+0/80/0/80/-768/l"
...
EndSection

Section "Monitor"
   Identifier   "Monitor1"
...
   Option "PreferredMode" "1024x768"
   Option "Panning"  "2048x3072+0+0/2048x3072+0+0/80/-768/80/0/l"
...
EndSection
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proppan_r1.diff
Type: text/x-diff
Size: 6130 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090628/470bcca1/attachment.diff>


More information about the xorg mailing list