.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "X11::Protocol::Ext::XINERAMA 3pm" .TH X11::Protocol::Ext::XINERAMA 3pm "2019-08-26" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" X11::Protocol::Ext::XINERAMA \- multi\-monitor display information .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& use X11::Protocol; \& my $X = X11::Protocol\->new; \& $X\->init_extension(\*(AqXINERAMA\*(Aq) \& or print "XINERAMA extension not available"; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Xinerama puts together two or more physical monitors to make a single large screen. The \s-1XINERAMA\s0 extension allows clients to enquire about the setup. .PP The 1.0 \*(L"PanoramiX\*(R" requests take a \f(CW$window\fR 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 \&\*(L"Xinerama\*(R" requests don't have that. .PP See \fIexamples/xinerama\-info.pl\fR for a sample program dumping the Xinerama state information. .SH "REQUESTS" .IX Header "REQUESTS" The following requests are made available with an \f(CW\*(C`init_extension()\*(C'\fR per \&\*(L"\s-1EXTENSIONS\*(R"\s0 in X11::Protocol. .PP .Vb 1 \& my $bool = $X\->init_extension(\*(AqXINERAMA\*(Aq); .Ve .SS "Xinerama 1.0" .IX Subsection "Xinerama 1.0" .ie n .IP """($server_major, $server_minor) = $X\->PanoramiXQueryVersion ($client_major, $client_minor)""" 4 .el .IP "\f(CW($server_major, $server_minor) = $X\->PanoramiXQueryVersion ($client_major, $client_minor)\fR" 4 .IX Item "($server_major, $server_minor) = $X->PanoramiXQueryVersion ($client_major, $client_minor)" Negotiate a protocol version with the server. \f(CW$client_major\fR and \&\f(CW$client_minor\fR is what the client would like, the returned \&\f(CW$server_major\fR and \f(CW$server_minor\fR is what the server will do, which might be less than requested (but not more). .Sp The current code in this module supports up to 1.1. The intention would be to automatically negotiate within \f(CW\*(C`init_extension()\*(C'\fR if/when necessary, .ie n .IP """$flag = $X\->PanoramiXGetState ($window)""" 4 .el .IP "\f(CW$flag = $X\->PanoramiXGetState ($window)\fR" 4 .IX Item "$flag = $X->PanoramiXGetState ($window)" Return non-zero if Xinerama is active on the screen of \f(CW$window\fR (an \s-1XID\s0). .ie n .IP """$count = $X\->PanoramiXGetScreenCount ($window)""" 4 .el .IP "\f(CW$count = $X\->PanoramiXGetScreenCount ($window)\fR" 4 .IX Item "$count = $X->PanoramiXGetScreenCount ($window)" Return the number of physical monitors on the screen of \f(CW$window\fR (an \s-1XID\s0). .ie n .IP """($width, $height) = $X\->PanoramiXGetScreenSize ($window, $monitor)""" 4 .el .IP "\f(CW($width, $height) = $X\->PanoramiXGetScreenSize ($window, $monitor)\fR" 4 .IX Item "($width, $height) = $X->PanoramiXGetScreenSize ($window, $monitor)" Return the size in pixels of physical monitor number \f(CW$monitor\fR (integer, 0 for the first monitor) on the screen of \f(CW$window\fR (an \s-1XID\s0). .SS "Xinerama 1.1" .IX Subsection "Xinerama 1.1" .ie n .IP """$bool = $X\->XineramaIsActive ()""" 4 .el .IP "\f(CW$bool = $X\->XineramaIsActive ()\fR" 4 .IX Item "$bool = $X->XineramaIsActive ()" Return non-zero if Xinerama is active on the \f(CW$X\fR server. .ie n .IP """@rectangles = $X\->XineramaQueryScreens ()""" 4 .el .IP "\f(CW@rectangles = $X\->XineramaQueryScreens ()\fR" 4 .IX Item "@rectangles = $X->XineramaQueryScreens ()" Return the rectangular areas made up by the physical monitors. The return is a list of arrayrefs, .Sp .Vb 1 \& [ $x,$y, $width,$height ] .Ve .Sp \&\f(CW$x\fR,\f(CW$y\fR is the top-left corner of the monitor in the combined screen. .SH "BUGS" .IX Header "BUGS" .ie n .SS """Xsun""" .el .SS "\f(CWXsun\fP" .IX Subsection "Xsun" Rumour has it the \f(CW\*(C`Xsun\*(C'\fR server with Xinerama 1.0 had a different request number 4 than the \f(CW\*(C`XineramaIsActive\*(C'\fR of Xinerama 1.1 above. .Sp .RS 4 .RE .PP There's no attempt to do anything about this here, as yet. If \&\f(CW\*(C`PanoramiXQueryVersion()\*(C'\fR reports 1.0 then you shouldn't use \&\f(CW\*(C`XineramaIsActive()\*(C'\fR anyway, so no clash. If you do and it's the \f(CW\*(C`Xsun\*(C'\fR server then expect either a Length error reply, or the server to adapt itself to the request length and behave as \f(CW\*(C`XineramaIsActive\*(C'\fR. .ie n .SS """PanoramiXGetScreenSize()"" Buffer Overrun" .el .SS "\f(CWPanoramiXGetScreenSize()\fP Buffer Overrun" .IX Subsection "PanoramiXGetScreenSize() Buffer Overrun" Early server code such as X11R6.4 might not range check the monitor number in \f(CW\*(C`PanoramiXGetScreenSize()\*(C'\fR. Did big values read out fragments of arbitrary memory, or cause a segfault? Don't do that. .Sp .RS 4 X.org some time post 1.5.x, \&\*(L"Prevent buffer overrun in ProcPanoramiXGetScreenSize\*(R", .RE .SH "OTHER NOTES" .IX Header "OTHER NOTES" To simulate some Xinerama for testing the \f(CW\*(C`Xdmx\*(C'\fR server can multiplex together two or more other servers to present one big screen. Those sub-servers can even be \f(CW\*(C`Xnest\*(C'\fR or \f(CW\*(C`Xephyr\*(C'\fR windows on an existing X display. For example running up \f(CW\*(C`Xdmx\*(C'\fR as display \*(L":102\*(R", .PP .Vb 4 \& Xephyr :5 \-screen 200x100 & \& Xephyr :6 \-screen 190x110 & \& sleep 1 \& Xdmx \-display :5 \-display :6 +xinerama \-input :5 \-input :6 :102 .Ve .PP \&\f(CW\*(C`Xephyr\*(C'\fR implements some extensions natively, whereas \f(CW\*(C`Xnest\*(C'\fR relies on the target server capabilities. Or to run up without bothering to look at anything \f(CW\*(C`Xvfb\*(C'\fR in memory or a disk file. .SH "SEE ALSO" .IX Header "SEE ALSO" X11::Protocol .PP Initial technical details \&\f(CW\*(C`http://www.kernel.org/doc/als1999/Conference/IMcCartney/xinerama.html\*(C'\fR .SH "HOME PAGE" .IX Header "HOME PAGE" .SH "LICENSE" .IX Header "LICENSE" Copyright 2011, 2012, 2013, 2014, 2017 Kevin Ryde .PP X11\-Protocol\-Other is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. .PP X11\-Protocol\-Other is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with X11\-Protocol\-Other. If not, see .