X11::Protocol::Ext::XINERAMA3pm
Multi-monitor display information
Usage
use X11::Protocol;my $X = X11::Protocol->new;$X->init_extension('XINERAMA')or print "XINERAMA extension not available";
Overview
Xinerama puts together two or more physical monitors to make a single large screen. The XINERAMA extension allows clients to enquire about the setup.
The 1.0 "PanoramiX" requests take a $window parameter apparently to allow for more than one X screen made up of multiple physical monitors, but in practice the servers have only made one screen this way and the 1.1 "Xinerama" requests don't have that.
See examples/xinerama-info.pl for a sample program dumping the Xinerama state information.
Requests
The following requests are made available with an init_extension() per "EXTENSIONS" in X11::Protocol.
my $bool = $X->init_extension('XINERAMA');
Xinerama 1.0
- "($server_major, $server_minor) = $X->PanoramiXQueryVersion ($client_major, $client_minor)"
-
Negotiate a protocol version with the server.
$client_majorand$client_minoris what the client would like, the returned$server_majorand$server_minoris what the server will do, which might be less than requested (but not more).The current code in this module supports up to 1.1. The intention would be to automatically negotiate within
init_extension()if/when necessary,
- "$flag = $X->PanoramiXGetState ($window)"
-
Return non-zero if Xinerama is active on the screen of
$window(an XID).
- "$count = $X->PanoramiXGetScreenCount ($window)"
-
Return the number of physical monitors on the screen of
$window(an XID).
- "($width, $height) = $X->PanoramiXGetScreenSize ($window, $monitor)"
-
Return the size in pixels of physical monitor number
$monitor(integer, 0 for the first monitor) on the screen of$window(an XID).
Xinerama 1.1
- "$bool = $X->XineramaIsActive ()"
-
Return non-zero if Xinerama is active on the
$Xserver.
- "@rectangles = $X->XineramaQueryScreens ()"
-
Return the rectangular areas made up by the physical monitors. The return is a list of arrayrefs,
[ $x,$y, $width,$height ]$x,$yis the top-left corner of the monitor in the combined screen.
Other notes
To simulate some Xinerama for testing the "Xdmx" server can multiplex together two or more other servers to present one big screen. Those sub-servers can even be "Xnest" or "Xephyr" windows on an existing X display. For example running up "Xdmx" as display ":102",
Xephyr :5 -screen 200x100 &Xephyr :6 -screen 190x110 &sleep 1Xdmx -display :5 -display :6 +xinerama -input :5 -input :6 :102
"Xephyr" implements some extensions natively, whereas "Xnest" relies on the target server capabilities. Or to run up without bothering to look at anything "Xvfb" in memory or a disk file.
Home page
<http://user42.tuxfamily.org/x11-protocol-other/index.html>
Releases
7 releases since Debian 8 (Jessie); the text changed 4 times.