[Patch] NVIDIA TwinView support

James (james@piku.org.uk)
Tue, 13 Nov 2001 00:12:46 +0000 (GMT)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--655616-209428659-1005610366=:20933
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello...

The attached patch might be of use to people who have dualhead NVIDIA
cards that use TwinView.

What it does is adds a new option to your feel file called
'TwinOrient'. Set this to one of the following:

0 - disable TwinView support
1 - TwinView is in horizontal mode (screens side-by-side)
2 - TwinView is in vertical mode (one above the other)

This patch will then make AS never put a window across the monitor
join. Instead the window will be put on the first display.

Now, this is a little bit of a kludge because I have to guess how big
each screen is (thanks NVIDIA, you're so kind... :/ ). I do this by
taking the value of Scr.MyDisplayWidth and divide it by two. I then see
if the new window's 'x' value and 'width' will cause the window to overlap
the monitor join. If it will, the 'x' value is set to 1.

Not that neat, but at least you won't end up with a Mozilla error
message spanning both screens with the OK button neatly centred on the
join :-) It won't work so well on a system with two screens of different
sizes without more complexity (i.e more config variables or some parsing
of the XF86Config file) but I find it better than nothing.

Also, some windows appear to be out of AS's control (XMMS is one) as to
where they go, so those will continue to appear wherever they want. AS
seems to think they get put at 'x = 0' but they then appear somewhere
else.

This patch doesn't affect the user's ability to drag windows over the
join, that stays the same. It only affects new windows.

-- 
California is a fine place to live -- if you happen to be an orange.
6AD6 865A BF6E 76BB 1FC2 | www.piku.org.uk/public-key.asc
E4C4 DEEA 7D08 D511 E149 | jjj.cvxh.bet.hx wnzrf@cvxh.bet.hx (rot13'd)

--655616-209428659-1005610366=:20933
Content-Type: APPLICATION/octet-stream; name="twinview.diff.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.33.0111130012460.20933@bigbird.reddwarf.net>
Content-Description: twinview diff
Content-Disposition: attachment; filename="twinview.diff.gz"

H4sICB1i8DsAA3R3aW52aWV3LmRpZmYAlVZtT+M4EP5cfsWI021b+pa0BUrL
rqgo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4ZN8TWVlzIYssDu
qmXci2KfNpQnKeX1cFexYpH9dmRvcmzOjXZubnTMvMBBnc1pcw1x6NwyHZmR
V3Lh9BRLu1y1utH96DLmnmaCX+FxqBWkvQZJm9+G/hD1tUxvVGOMs2T+2kuO
yiaivwXgACgsz3opPy6nncVEFXQyp5haoLSMsZID+aje7IB002bkuu7aVk3a
X8ezJ+yuwSSNl+oVMCF5KgOBPFYKGEPf1kP2/WGN8zXbKxjjWQKemCfGel1Z
8udJNeMr7yaxpdbbTWKVWyyVtHZXKYo+GHv7QMxBGQ7bH/OfWwV7IbiUdqiG
6QvWM+tbf2KTF29uhNB2dzqkkDZYZDX3y7mA7SkFR/gdtdxeRpA3l/i0QCPw
Xz/F1NvGCgAA
--655616-209428659-1005610366=:20933--
_______________________________________________
The AfterStep Window Manager for X User's Mailing List
http://mail.afterstep.org/mailman/listinfo/as-users