samedi 31 janvier 2015

Stretch window over two monitors with "gap" in between


I have a dual monitor setup with Compiz as window manager on Ubuntu 14.04. I can resize a window to stretch over both windows. However, while the physical display panels are a few centimeters apart, the software by default thinks of them to be right next to each other without a gap in between. This means, e.g. a diagonal line ends up looking like this:



+----------+ +----------+
| | | / |
| | | / |
| | | / |
| | |/ |
| /| | |
| / | | |
+----------+ +----------+


What I'd like to achieve is something more like this:



+----------+ +----------+
| | | / |
| | |/ |
| | | |
| | | |
| /| | |
| / | | |
+----------+ +----------+


This would result in part of the window being hidden, but that's acceptable.


I can make X regard the displays to have a gap in between as follows:



$ xrandr
Screen 0: minimum 320 x 200, current 2048 x 1280, maximum 32767 x 32767
LVDS1 connected (normal left inverted right x axis y axis)
1366x768 60.0 +
1360x768 59.8 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 connected primary 1024x1280+0+0 left (normal left inverted right x axis y axis) 376mm x 301mm
1280x1024 60.0*+ 75.0
1280x960 60.0
1152x864 75.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
HDMI3 connected 1024x1280+1024+0 right (normal left inverted right x axis y axis) 376mm x 301mm
1280x1024 60.0*+ 75.0
1280x960 60.0
1152x864 75.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
$ xrandr --fb 2184x1280
$ xrandr --output HDMI3 --pos 1160x0


At first sight, this seems to work perfectly – when I move the mouse in a diagonal line across the gap between the monitors, it disappears "behind" the monitor bezels and re-appears where I'd expect the diagonal line to continue.


However, I can no longer move or resize a window to stretch across both monitors. Neither the mouse nor wmctrl seem to be able to do that.


Is there a way to achieve what I want?



Aucun commentaire:

Enregistrer un commentaire