Out of desperation and curiosity, I wrote a very simple shared library to override the XineramaQueryScreens() function to return the info I wanted (and XineramaIsActive() to always return true too). I then LD_PRELOAD it to see the effect.
My setup is 3 screens, 2 cards. The left 19" and center 20" screen are on card 1 with TwinView on. The right 19" screen is on card 2. The resolutions are respectively 1440x900, 1680x1050, 1440x900.
I have my "fake" XineramaQueryScreens() to always return 2 heads, 1440x900+0+0 and 1680x1050+1440+0.
xdpyinfo -ext XINERAMA now shows:
XINERAMA version 1.1 opcode: 150
head #0: 1440x900 @ 0,0
head #1: 1680x1050 @ 1440,0
I'm using Xfce. The desktop settings now thinks I have two screens, and each of them has 2 monitors. So, "Screen1 Monitor1", "Screen1 Monitor2", "Screen2 Monitor1", "Screen2 Monitor2".
Obviously, that is not true. However, as far as I can tell, everything seems to work the way it should. My left, center, right are S1M1, S1M2, S2M1. S2M2 is a dead screen, but I don't see any bad things with it being there so far. And I'm guessing since my S1M1 has the same resolution as S2M1, it works without any weird behavior.
Desktop wallpaper are shown correctly for the 3 "real" screens. Xfce panel also behaves properly. Maximized windows are also correct, not spanning across two monitors.
Now I'm thinking, would it make sense for the NVIDIA configuration to have something for the user to force it to do something like that? Kinda like a i-know-what-i-am-doing-just-let-me-do-it option? It might be something like the TwinViewXineramaInfoOverride option. Maybe a ForceXineramaInfoOverride?
Or am I totally wrong here?