xrandr 1.2.2

This commit is contained in:
matthieu
2007-11-24 16:58:12 +00:00
parent 3d6019abca
commit 7f9b9fc892
6 changed files with 2845 additions and 405 deletions

View File

@@ -21,7 +21,7 @@
bin_PROGRAMS = xrandr
xrandr_CFLAGS = $(XRANDR_CFLAGS)
AM_CFLAGS = $(XRANDR_CFLAGS)
xrandr_LDADD = $(XRANDR_LIBS)
xrandr_SOURCES = \

View File

@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2005-07-08'
timestamp='2006-02-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,7 +106,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -206,6 +206,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
@@ -764,7 +767,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -772,6 +780,9 @@ EOF
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS_NT-*:*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@@ -779,8 +790,11 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
x86:Interix*:[345]*)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T:Interix*:[345]*)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -794,7 +808,7 @@ EOF
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:*)
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
@@ -851,7 +865,11 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
@@ -870,9 +888,16 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
@@ -916,6 +941,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
@@ -961,7 +989,7 @@ EOF
LIBC=gnulibc1
# endif
#else
#ifdef __INTEL_COMPILER
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
LIBC=gnu
#else
LIBC=gnuaout
@@ -971,7 +999,11 @@ EOF
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1182,7 +1214,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1261,6 +1292,9 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

47
app/xrandr/config.sub vendored
View File

@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2005-07-08'
timestamp='2006-02-23'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -119,8 +119,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -171,6 +172,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +192,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -239,7 +248,7 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -257,8 +266,9 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ms1 \
| mt \
| msp430 \
| nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
@@ -286,6 +296,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -336,8 +349,9 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| ms1-* \
| mt-* \
| msp430-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
@@ -696,6 +710,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -803,6 +820,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -859,6 +882,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -1174,21 +1201,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*)
| -skyos* | -haiku* | -rdos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)

View File

@@ -22,7 +22,7 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
AC_INIT(xrandr,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xrandr)
AC_INIT(xrandr,[1.2.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xrandr)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
@@ -32,7 +32,7 @@ AC_PROG_CC
AC_PROG_INSTALL
# Checks for pkg-config packages
PKG_CHECK_MODULES(XRANDR, xrandr xrender x11)
PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2.0 xrender x11)
AC_SUBST(XRANDR_CFLAGS)
AC_SUBST(XRANDR_LIBS)

File diff suppressed because it is too large Load Diff

View File

@@ -26,49 +26,162 @@
xrandr \- primitive command line interface to RandR extension
.SH SYNOPSIS
.B "xrandr"
[-help] [-display \fIdisplay\fP]
[-o \fIorientation\fP]
[-q] [-v]
[-s \fIsize\fP]
[-x] [-y]
[--screen \fIsnum\fP]
[--verbose]
[\-help] [\-display \fIdisplay\fP]
[\-q] [\-v]
[\-\-verbose]
[\-\-screen \fIsnum\fP]
.br
.B RandR version 1.2 options
.br
[\-\-prop]
[\-\-fb <width>x<height>]
[\-\-fbmm <width>x<height>]
[\-\-dpi <dpi>]
.br
.B Per-output options
.br
[\-\-output <output>]
[\-\-auto]
[\-\-mode <mode>]
[\-\-preferred]
[\-\-pos <x>x<y>]
[\-\-rate <rate>]
[\-\-reflect \fIreflection\fP]
[\-\-rotate \fIorientation\fP]
[\-\-left\-of <output>\]
[\-\-right\-of <output>\]
[\-\-above <output>\]
[\-\-below <output>\]
[\-\-same-as <output>\]
[\-\-set <property> <value>]
[\-\-off]
[\-\-crtc <crtc>]
[\-\-newmode <name> \fImode\fP]
[\-\-rmmode <name>]
[\-\-addmode <output> <name>]
[\-\-delmode <output> <name>]
.br
.B RandR version 1.0 and version 1.1 options
.br
[\-o \fIorientation\fP]
[\-s \fIsize\fP]
[\-x] [\-y]
.SH DESCRIPTION
.I Xrandr
is used to set the screen size, orientation and/or reflection.
The
.I -s
option is a small integer index used to specify which size the screen should be set to.
To find out what sizes are available, use the
.I -q
option, which reports the sizes available, the current rotation, and
the possible rotations and reflections.
The default size is the first size specified in the list.
The
.I -o
option is used to specify the orientation of the screen,
and can be one of
\fI"normal inverted left right 0 1 2 3"\fP.
is used to set the size, orientation and/or reflection of the outputs for a
screen. It can also set the screen size.
There are a few global options; the rest modify a particular output and
follow the specification of that output on the command line.
.IP \-\-help
Print out a summary of the usage and exit.
.IP \-v
Print out the RandR version reported by the X server and exit.
.IP \-\-verbose
causes xrandr to be more verbose. When used with \-q (or without other
options), xrandr will display more information about the server state. When
used along with options that reconfigure the system, progress will be
reported while executing the configuration changes.
.IP \-q
When this option is present, or when no configuration changes are requested,
xrandr will display the current state of the system.
.IP "\-screen \fIsnum\fP"
This option selects which screen to manipulate. Note this refers to the X
screen abstraction, not the monitor (or output).
.SH "RandR version 1.2 options"
These options are only available for X server supporting RandR version 1.2
or newer.
.IP \-\-prop
This option causes xrandr to display the contents of properties for each
output. \-\-verbose also enables \-\-prop.
.IP "\-\-fb <width>x<height>"
Reconfigures the screen to the specified size. All configured monitors must
fit within this size. When this option is not provided, xrandr computes the
smallest screen size that will hold the set of configured outputs; this
option provides a way to override that behaviour.
.IP "\-\-fbmm <width>x<height>"
Sets the reported values for the physical size of the screen. Normally,
xrandr resets the reported physical size values to keep the DPI constant.
This overrides that computation.
.IP "\-\-dpi <dpi>"
This also sets the reported physical size values of the screen, it uses the
specified DPI value to compute an appropriate physical size using whatever
pixel size will be set.
.PP
The
.I -x
option instructs the server to reflect the screen on the X axis.
The
.I -y
option instructs the server to reflect the screen on the Y axis.
Reflection is applied after rotation.
.B "Per-output options"
.IP "\-\-output <output>"
Selects an output to reconfigure. Use either the name of the output or the
XID.
.IP \-\-auto
For connected but disabled outputs, this will enable them using their
preferred mode (or, something close to 96dpi if they have no preferred
mode). For disconnected but enabled outputs, this will disable them.
.IP "\-\-mode <mode>"
This selects a mode. Use either the name or the XID for <mode>
.IP "\-\-preferred"
This selects the same mode as \-\-auto, but it doesn't automatically enable or
disable the output.
.IP "\-\-pos <x>x<y>"
Position the output within the screen using pixel coordinates.
.IP "\-\-rate <rate>"
This marks a preference for refresh rates close to the specified value, when
multiple modes have the same name, this will select the one with the nearest
refresh rate.
.IP "\-\-reflect \fIreflection\fP"
Reflection can be one of 'normal' 'x', 'y' or 'xy'. This causes the output
contents to be reflected across the specified axes.
.IP "\-\-rotate \fIrotation\fP"
Rotation can be one of 'normal', 'left', 'right' or 'inverted'. This causes
the output contents to be rotated in the specified direction.
.IP "\-\-left\-of, \-\-right\-of, \-\-above, \-\-below, \-\-same-as <another output>"
Use one of these options to position the output relative to the position of
another output. This allows convenient tiling of outputs within the screen.
The position is always computed relative to the new position of the other
output, so it is not valid to say \-\-output a \-\-left\-of b \-\-output
b \-\-left\-of a.
.IP "\-\-set <property> <value>"
Sets an output property. Integer properties may be specified as a valid
(see \-\-prop) decimal or hexadecimal (with a leading 0x) value. Atom properties
may be set to any of the valid atoms (see \-\-prop). String properties may be
set to any value.
.IP "\-\-off"
Disables the output.
.IP "\-\-crtc <crtc>"
Uses the specified crtc (either as an index in the list of CRTCs or XID).
In normal usage, this option is not required as xrandr tries to make
sensible choices about which crtc to use with each output. When that fails
for some reason, this option can override the normal selection.
.IP "\-\-newmode <name> \fImode\fP"
New modelines can be added to the server and then associated with outputs.
This option does the former. The \fImode\fP is specified using the ModeLine
syntax for xorg.conf: hdisp hsyncstart hsyncend htotal vdisp vsyncstart
vsyncend vtotal \fIflags\fP. \fIflags\fP can be zero or more of +HSync,
-HSync, +VSync, -VSync, Interlace, DoubleScan, CSync, +CSync, -CSync.
.IP "\-\-rmmode <name>"
This removes a mode from the server if it is otherwise unused.
.IP "\-\-addmode <output> <name>"
Add a mode to the set of valid modes for an output.
.IP "\-\-delmode <output> <name>"
Remove a mode from the set of valid modes for an output.
.PP
The
.I -help
option prints out a usage summary.
The
.I --verbose
option tells you what xrandr is doing, selects for events, and tells you
when events are received to enable debugging.
.SH "RandR version 1.1 options"
These options are available for X servers supporting RandR version 1.1 or
older. They are still valid for newer X servers, but they don't interact
sensibly with version 1.2 options on the same command line.
.IP "\-s <size index> or \-s <width>x<height>"
This sets the screen size, either matching by size or using the index into
the list of available sizes.
.IP "\-o \fIrotation\fP"
This specifies the orientation of the screen,
and can be one of normal, inverted, left or right.
.IP \-x
Reflect across the X axis.
.IP \-y
Reflect across the Y axis.
.SH "SEE ALSO"
Xrandr(3)
.SH AUTHORS
Keith Packard,
Open Source Technology Center, Intel Corporation.
and
Jim Gettys,
Cambridge Research Laboratory, HP Labs, HP.