xrandr 1.2.99.4.
This commit is contained in:
parent
e6f7a45dd0
commit
18aa05e26a
|
@ -7,6 +7,7 @@ x11-xserver-utils (7.3+6) UNRELEASED; urgency=low
|
|||
* sessreg 1.0.4.
|
||||
* Add sessreg copyright and license to debian/copyright, from sessreg's
|
||||
COPYING.
|
||||
* xrandr 1.2.99.4.
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Sun, 03 Aug 2008 01:26:58 +0200
|
||||
|
||||
|
|
340
xrandr/ChangeLog
340
xrandr/ChangeLog
|
@ -1,3 +1,343 @@
|
|||
commit 880f045202d1e70368b855c3783604e19be946b8
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Sun Feb 1 14:39:30 2009 +0100
|
||||
|
||||
Bump to 1.2.99.4
|
||||
|
||||
commit 010dfc4bdd309256aecd006bb2b5b6937c2a119c
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Sun Feb 1 14:34:15 2009 +0100
|
||||
|
||||
Document the --primary and --noprimary options
|
||||
|
||||
commit 48014498d275a9aab986b4bf295538a5b38ddfeb
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Sun Feb 1 14:12:21 2009 +0100
|
||||
|
||||
Document the --current option
|
||||
|
||||
commit 909defc8a2b009ab845d875ba10e1ca01fb9d648
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Fri Jan 30 20:37:34 2009 -0800
|
||||
|
||||
Add --noprimary option
|
||||
|
||||
commit 6c70e0ee693ea293e8674d049249b462f3d36855
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Fri Jan 30 20:11:10 2009 -0800
|
||||
|
||||
Add --primary option
|
||||
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
|
||||
commit 77891e7900765a320ad3d43b56bbb1f3081b6582
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Fri Jan 30 20:11:02 2009 -0800
|
||||
|
||||
Add --nograb option
|
||||
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
|
||||
commit 6f3e2bb207cff069791811ef2bbe7798759ed810
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Tue Dec 9 21:26:50 2008 -0800
|
||||
|
||||
Add --current option to use new XRRGetScreenResourcesCurrent API
|
||||
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
|
||||
commit d98d1f4055d8fbae1dc8d8c54467bfef21010694
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Fri Jan 30 17:46:05 2009 +0100
|
||||
|
||||
Several fatal() were missing \n.
|
||||
|
||||
commit 9ea6e4210d49c13991a7d07e54f6f59e3dc8ce72
|
||||
Author: Éric Piel <E.A.B.Piel@tudelft.nl>
|
||||
Date: Mon Jan 19 16:18:46 2009 +0100
|
||||
|
||||
Add docs for --transform and --scale.
|
||||
|
||||
The new --transform and --scale options were added, but not yet
|
||||
documented. This includes also an example of usage of panning and
|
||||
scaling at the same time.
|
||||
|
||||
commit 4d381d6a88fe147f8b6eabd765a2f42c6402d8c6
|
||||
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
||||
Date: Mon Jan 26 16:40:59 2009 -0200
|
||||
|
||||
Correct make distcheck and gcc/sparse warnings.
|
||||
|
||||
commit 7509ecb290689e0b1d5e1000c9fbd312f1efb4ca
|
||||
Author: Maarten Maathuis <madman2003@gmail.com>
|
||||
Date: Mon Jan 5 19:47:21 2009 +0100
|
||||
|
||||
Stay away from doublescan modes unless a refresh rate is specified.
|
||||
|
||||
commit f77ad847c0d3f8f0c6e8ffbf0bec39e5e9c5ded0
|
||||
Author: Maarten Maathuis <madman2003@gmail.com>
|
||||
Date: Mon Dec 22 19:46:24 2008 +0100
|
||||
|
||||
Fix gamma computation.
|
||||
|
||||
- The previous version sometimes overflowed.
|
||||
|
||||
commit 5ddde7151841a8db99a2f38689a176114b2a45e5
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Thu Dec 18 16:09:39 2008 +0100
|
||||
|
||||
Print multiple Atom and INT32 properties.
|
||||
|
||||
Improve output formating of strings.
|
||||
|
||||
commit 96af64f0de71f4149740b486baaefca744bb1bc1
|
||||
Author: Maarten Maathuis <madman2003@gmail.com>
|
||||
Date: Wed Dec 17 17:18:14 2008 +0100
|
||||
|
||||
randr-1.2: support gamma changes.
|
||||
|
||||
commit 9b7a2a3d4ac7891bd5372a581e6a55a1c81497ef
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Mon Dec 15 20:39:43 2008 +0100
|
||||
|
||||
Bump to 1.2.99.3
|
||||
|
||||
commit e80add8a407a9327bda209ff11a97dc3336e0cab
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Mon Dec 15 21:00:55 2008 +0100
|
||||
|
||||
Add keystone.5c to EXTRA_DIST
|
||||
|
||||
commit c98591b0bf4753c4c075eccde6023ef644f8bf96
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Mon Dec 15 20:36:40 2008 +0100
|
||||
|
||||
Don't trash panning area, except if --panning or --fb is given.
|
||||
|
||||
Almost anything used to reduce the screen size to the current mode size, which
|
||||
is counter-productive when panning is active.
|
||||
|
||||
commit 8cb63b6df9e46e8b06a57cb54ad460355b604399
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Thu Dec 11 17:09:47 2008 +0100
|
||||
|
||||
Panning tracking areas describe full screen if set to 0. Use it as default.
|
||||
|
||||
Also improve reduced output on default tracking and borders.
|
||||
|
||||
commit b5efbb31ec7c27895507add4497dbfc87f930bb3
|
||||
Author: Adam Jackson <ajax@redhat.com>
|
||||
Date: Mon Dec 8 16:37:59 2008 -0500
|
||||
|
||||
Accept --props synonym for --prop
|
||||
|
||||
commit 57cabac91099a8abd5afad75de64e54930c078ec
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Mon Dec 8 12:24:37 2008 +0100
|
||||
|
||||
Only set transforms if actually changed.
|
||||
|
||||
Re-enables other crtc settings if transforms are not supported.
|
||||
|
||||
commit 970f689651fc86fa7a2ba24f0fab5f86f01af349
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Thu Dec 4 17:47:05 2008 +0100
|
||||
|
||||
Add manpage entry.
|
||||
|
||||
commit d030ae78e8516b916e9ea1ea81e3b4859bf35875
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Thu Dec 4 15:57:22 2008 +0100
|
||||
|
||||
Bump to 1.2.99.2, RandR requirements to 1.2.99.2
|
||||
|
||||
commit f6b5862f87ba7e1729c46136ef7754a06301853f
|
||||
Author: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Fri Nov 28 17:16:11 2008 +0100
|
||||
|
||||
Add panning support.
|
||||
|
||||
commit 1dc67ca918446cb7db4819f60f36e7bc6f4c047b
|
||||
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
|
||||
Date: Sat Dec 6 11:40:53 2008 +0100
|
||||
|
||||
Don't use GNU make only constructs.
|
||||
|
||||
commit 7963d4217c12d2e4b0c38ad4ff185462784609f7
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Mon Dec 1 23:27:51 2008 +0100
|
||||
|
||||
Require libXrandr 1.2.91
|
||||
|
||||
commit ba78e14c8c43a141fc5227e7bb75d6cfd0f70dba
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Mon Dec 1 21:45:47 2008 +0100
|
||||
|
||||
Fix build outside of the source dir
|
||||
|
||||
commit 63ba316bcbe8ad61ba63d9fe62c82e7d56dcc399
|
||||
Merge: a813c4d... 1b95e32...
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Mon Dec 1 21:33:35 2008 +0100
|
||||
|
||||
Merge branch 'transform-proposal' of git.freedesktop.org:/git/xorg/app/xrandr
|
||||
|
||||
commit 1b95e32b4b0a4a114e0fbebe8a18316d2f9010cf
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Fri Nov 14 14:14:24 2008 -0800
|
||||
|
||||
Add --scale and --transform to --help output
|
||||
|
||||
commit e9a5d1c598cd0440f062240430a9b86b4d514ada
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Fri Nov 14 14:13:51 2008 -0800
|
||||
|
||||
Check return value from XRRGetCrtcTransform
|
||||
|
||||
XRRGetCrtcTransform will return 0 if the X server does not support this
|
||||
request.
|
||||
|
||||
commit a813c4da7f0b166ee9001fa97c5d8d64e5b5b560
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Tue Aug 19 09:39:00 2008 -0700
|
||||
|
||||
Man page typo fix
|
||||
|
||||
commit 8ef4595aef15b7326822849a50c273f2a2b4ba30
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Fri Aug 15 21:23:13 2008 +0200
|
||||
|
||||
Manpage typo fixes
|
||||
|
||||
commit 977275a13be0687efc3db1fd3763174ff1256210
|
||||
Author: Eric Piel <E.A.B.Piel@tudelft.nl>
|
||||
Date: Sun Aug 10 23:28:25 2008 +0200
|
||||
|
||||
update the manpage
|
||||
|
||||
Describe all the options supported, including: --dryrun, -display,
|
||||
--q1, --q12, and --rate for 1.1
|
||||
Describe all short and long version of the option.
|
||||
Use the usual man style for the option arugments.
|
||||
Move the four --*mode options out of the output section as they are
|
||||
independant of an output.
|
||||
Mention cvt for computing modelines.
|
||||
Gives some examples.
|
||||
|
||||
commit 3046799a06ecb79211ef0f4a2db9de4eec7233fb
|
||||
Author: Egbert Eich <eich@freedesktop.org>
|
||||
Date: Sun Aug 3 13:24:49 2008 +0200
|
||||
|
||||
Fix for 64bit: feed a pointer to the right size variable to scanf().
|
||||
|
||||
XID is unsigned long, however %x in scanf takes a pointer to an unsigned int.
|
||||
Thus with XID xid, a sscanf(..., "0x%x", &xid) will most likely produce the
|
||||
wrong results.
|
||||
|
||||
commit 0d2082e9eb25cb7410309eed908b7f95abb8da79
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Tue Apr 1 23:46:02 2008 -0700
|
||||
|
||||
Exit when select output is not available
|
||||
|
||||
commit 18a189993b3df8bc54a79e0d62240ef203d6f34f
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Tue Apr 1 23:44:50 2008 -0700
|
||||
|
||||
Fix up xkeystone to use current screen/output settings
|
||||
|
||||
commit 9e8860f9231926090462ea20132cc9e1d64e5fe4
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Sun Mar 30 19:03:53 2008 -0700
|
||||
|
||||
Execute xrandr to set keystone correction
|
||||
|
||||
commit 206bfbea4ebe854fdfa66e8a6fbd9296b6004c0e
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Sun Mar 30 19:03:29 2008 -0700
|
||||
|
||||
add --transform none to reset to identity
|
||||
|
||||
commit 443e1f80c885133ae6df590f1a7663833c76b7f3
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Fri Mar 21 23:29:41 2008 -0700
|
||||
|
||||
Build and install xkeystone program from keystone.5c
|
||||
|
||||
commit a7a7eea510b5a87c1e12516fadae4d13bd26e0a0
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Fri Mar 21 23:26:30 2008 -0700
|
||||
|
||||
Track toolkit name change (chrome->nichrome)
|
||||
|
||||
commit 74dae9d4b06369a1863e7a68b7b3772751e06ff1
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Fri Mar 21 03:17:44 2008 -0700
|
||||
|
||||
Add keystone.5c program to help compute transforms.
|
||||
|
||||
commit 46bd35dd9004c0f9f47dc44b77a8c28e3ab7ced1
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Fri Mar 21 03:17:40 2008 -0700
|
||||
|
||||
Make screen undersize a warning instead of an error
|
||||
|
||||
commit b816bf38b418618c2f1cb5ded09aa3b346f8eb15
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Tue Mar 18 16:04:34 2008 -0700
|
||||
|
||||
Add --transform to pass arbitrary transforms to the server
|
||||
|
||||
commit 3809884530223e32f7026ec987257cb91e2122a9
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Tue Mar 18 16:04:22 2008 -0700
|
||||
|
||||
Eliminate inverse matrix from randr transform protocol
|
||||
|
||||
It is easier, and potentially more precise, to compute the inverse in the
|
||||
server where everything can eventually be kept in floating point form.
|
||||
|
||||
commit 854a7c2916455fec5ec1ba87576e26706d151381
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Mon Mar 17 13:59:40 2008 -0700
|
||||
|
||||
Transform mode bounds when computing sizes.
|
||||
|
||||
Ensure screen sizes are compared with projected mode image, including
|
||||
rotation and transformation.
|
||||
|
||||
commit bed3da4feaa505a5b50a4c94b0e6661bdac1fcbd
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Sat Mar 15 00:35:08 2008 -0700
|
||||
|
||||
Manage transform filters. Use bilinear for non-identity scale.
|
||||
|
||||
This involved creating a compound transform datatype to hold all of the
|
||||
relevant transform and filter information. Adding arbitrary transforms
|
||||
should be fairly easy at this point.
|
||||
|
||||
commit ba35bb5d306f4edf9a47b92f249132a0814f5db1
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Mon Mar 10 21:19:41 2008 -0700
|
||||
|
||||
Add output scaling using the 1.3 transform requests
|
||||
|
||||
commit 4dcc8ae1a6903434def1a2706f7c68ff9e2a17c4
|
||||
Author: Hong Liu <hong.liu@intel.com>
|
||||
Date: Mon Mar 10 21:37:09 2008 -0700
|
||||
|
||||
Move outputs among crtcs as necessary. Fixes 14570
|
||||
|
||||
This patch makes new requests override existing crtc allocations. Outputs
|
||||
with restricted crtc usage can now force existing outputs to switch
|
||||
automatcially.
|
||||
|
||||
commit 7465357396e2f32325791e27f28cbbe9753db3ab
|
||||
Author: Adam Jackson <ajax@redhat.com>
|
||||
Date: Fri Mar 7 16:38:28 2008 -0500
|
||||
|
||||
xrandr 1.2.3
|
||||
|
||||
commit 4450756d2d1d86f3c0bfaef81f6265f795468f32
|
||||
Author: Brice Goglin <bgoglin@debian.org>
|
||||
Date: Sat Dec 15 00:59:00 2007 +0100
|
||||
|
|
|
@ -21,6 +21,15 @@
|
|||
|
||||
bin_PROGRAMS = xrandr
|
||||
|
||||
bin_SCRIPTS = xkeystone
|
||||
|
||||
xkeystone: keystone.5c
|
||||
(echo '#!/usr/bin/env nickle'; cat ${srcdir}/keystone.5c) > $@
|
||||
chmod +x $@
|
||||
|
||||
clean-local:
|
||||
rm -f xkeystone
|
||||
|
||||
AM_CFLAGS = $(XRANDR_CFLAGS)
|
||||
xrandr_LDADD = $(XRANDR_LIBS)
|
||||
|
||||
|
@ -34,9 +43,8 @@ appmandir = $(APP_MAN_DIR)
|
|||
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
|
||||
EXTRA_DIST = $(appman_PRE) ChangeLog autogen.sh xrandr_test.pl
|
||||
EXTRA_DIST = $(appman_PRE) xrandr_test.pl keystone.5c
|
||||
CLEANFILES = $(appman_DATA)
|
||||
MAINTAINERCLEANFILES = ChangeLog
|
||||
|
||||
SED = sed
|
||||
|
||||
|
@ -62,11 +70,13 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
|||
.man.$(APP_MAN_SUFFIX):
|
||||
sed $(MAN_SUBSTS) < $< > $@
|
||||
|
||||
EXTRA_DIST += ChangeLog
|
||||
MAINTAINERCLEANFILES = ChangeLog
|
||||
|
||||
.PHONY: ChangeLog
|
||||
|
||||
ChangeLog:
|
||||
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || \
|
||||
(touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
@ -69,13 +70,16 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
|||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
|
||||
"$(DESTDIR)$(appmandir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_xrandr_OBJECTS = xrandr.$(OBJEXT)
|
||||
xrandr_OBJECTS = $(am_xrandr_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
xrandr_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
|
@ -105,7 +109,6 @@ am__remove_distdir = \
|
|||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
|
||||
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
|
||||
|
@ -119,7 +122,10 @@ AWK = @AWK@
|
|||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
|
@ -128,9 +134,11 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
|||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FILE_MAN_DIR = @FILE_MAN_DIR@
|
||||
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
@ -181,6 +189,7 @@ build_vendor = @build_vendor@
|
|||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
distcleancheck_listfiles = @distcleancheck_listfiles@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
@ -211,6 +220,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
bin_SCRIPTS = xkeystone
|
||||
AM_CFLAGS = $(XRANDR_CFLAGS)
|
||||
xrandr_LDADD = $(XRANDR_LIBS)
|
||||
xrandr_SOURCES = \
|
||||
|
@ -221,9 +231,8 @@ appman_PRE = \
|
|||
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
EXTRA_DIST = $(appman_PRE) ChangeLog autogen.sh xrandr_test.pl
|
||||
EXTRA_DIST = $(appman_PRE) xrandr_test.pl keystone.5c ChangeLog
|
||||
CLEANFILES = $(appman_DATA)
|
||||
MAINTAINERCLEANFILES = ChangeLog
|
||||
SED = sed
|
||||
|
||||
# Strings to replace in man pages
|
||||
|
@ -243,6 +252,7 @@ MAN_SUBSTS = \
|
|||
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
|
||||
|
||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
||||
MAINTAINERCLEANFILES = ChangeLog
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
|
@ -324,6 +334,25 @@ clean-binPROGRAMS:
|
|||
xrandr$(EXEEXT): $(xrandr_OBJECTS) $(xrandr_DEPENDENCIES)
|
||||
@rm -f xrandr$(EXEEXT)
|
||||
$(LINK) $(xrandr_OBJECTS) $(xrandr_LDADD) $(LIBS)
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
@ -547,9 +576,9 @@ distcleancheck: distclean
|
|||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS) $(DATA) config.h
|
||||
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) config.h
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
|
@ -580,7 +609,7 @@ maintainer-clean-generic:
|
|||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
|
@ -603,7 +632,7 @@ install-data-am: install-appmanDATA
|
|||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
install-exec-am: install-binPROGRAMS install-binSCRIPTS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
|
@ -636,35 +665,44 @@ ps: ps-am
|
|||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS
|
||||
uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
|
||||
uninstall-binSCRIPTS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-zip \
|
||||
distcheck distclean distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-appmanDATA install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
clean-binPROGRAMS clean-generic clean-local ctags dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar \
|
||||
dist-tarZ dist-zip distcheck distclean distclean-compile \
|
||||
distclean-generic distclean-hdr distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-appmanDATA \
|
||||
install-binPROGRAMS install-binSCRIPTS install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS
|
||||
uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
|
||||
uninstall-binSCRIPTS
|
||||
|
||||
|
||||
xkeystone: keystone.5c
|
||||
(echo '#!/usr/bin/env nickle'; cat ${srcdir}/keystone.5c) > $@
|
||||
chmod +x $@
|
||||
|
||||
clean-local:
|
||||
rm -f xkeystone
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
sed $(MAN_SUBSTS) < $< > $@
|
||||
|
||||
.PHONY: ChangeLog
|
||||
|
||||
ChangeLog:
|
||||
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || \
|
||||
(touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
|
|
@ -87,14 +87,16 @@ fi])
|
|||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
[if test -n "$PKG_CONFIG"; then
|
||||
if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
else
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
|
@ -138,9 +140,9 @@ See the pkg-config man page for more details.])
|
|||
if test $pkg_failed = yes; then
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
@ -175,6 +177,7 @@ else
|
|||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
||||
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||
dnl
|
||||
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl
|
||||
|
@ -222,7 +225,7 @@ AC_DEFUN([XORG_MACROS_VERSION],[
|
|||
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
|
||||
[XORG_MACROS_version=1.1.6
|
||||
[XORG_MACROS_version=1.2.1
|
||||
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
|
||||
|
@ -256,6 +259,10 @@ else
|
|||
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS=-undef
|
||||
AC_MSG_RESULT([yes])
|
||||
# under Cygwin unix is still defined even with -undef
|
||||
elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS="-undef -ansi"
|
||||
AC_MSG_RESULT([yes, with -ansi])
|
||||
else
|
||||
AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
|
||||
fi
|
||||
|
@ -368,7 +375,9 @@ AC_SUBST([ADMIN_MAN_DIR])
|
|||
# Whether or not the necessary tools and files are found can be checked
|
||||
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
|
||||
AC_DEFUN([XORG_CHECK_LINUXDOC],[
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
|
||||
if test x"$cross_compiling" = x"yes" ; then
|
||||
|
@ -424,7 +433,9 @@ AC_SUBST(MAKE_HTML)
|
|||
# indicates whether the necessary tools and files are found and, if set,
|
||||
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
|
||||
AC_DEFUN([XORG_CHECK_DOCBOOK],[
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
BUILDTXTDOC=no
|
||||
BUILDPDFDOC=no
|
||||
|
@ -601,6 +612,31 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
|
|||
|
||||
]) # XORG_LINT_LIBRARY
|
||||
|
||||
# XORG_CWARNFLAGS
|
||||
# ---------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines CWARNFLAGS to enable C compiler warnings.
|
||||
#
|
||||
AC_DEFUN([XORG_CWARNFLAGS], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
if test "x$GCC" = xyes ; then
|
||||
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
|
||||
-Wbad-function-cast"
|
||||
case `gcc -dumpversion` in
|
||||
3.4.* | 4.*)
|
||||
CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
if test "x$SUNCC" = "xyes"; then
|
||||
CWARNFLAGS="-v"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CWARNFLAGS)
|
||||
]) # XORG_CWARNFLAGS
|
||||
dnl Copyright 2005 Red Hat, Inc
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
|
@ -663,6 +699,23 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
|
|||
[Patch version of this package])
|
||||
])
|
||||
|
||||
# XORG_CHANGELOG()
|
||||
# ----------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines the variable CHANGELOG_CMD as the command to generate
|
||||
# ChangeLog from git.
|
||||
#
|
||||
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
|
||||
#
|
||||
AC_DEFUN([XORG_CHANGELOG], [
|
||||
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
|
||||
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
|
||||
echo 'git directory not found: installing possibly empty changelog.' >&2)"
|
||||
AC_SUBST([CHANGELOG_CMD])
|
||||
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
|
||||
]) # XORG_CHANGELOG
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
|
||||
autoreconf -v --install || exit 1
|
||||
cd $ORIGDIR || exit $?
|
||||
|
||||
$srcdir/configure --enable-maintainer-mode "$@"
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2008-01-08'
|
||||
timestamp='2008-01-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
|
||||
|
@ -1484,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
|
|||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
and
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
|
|
|
@ -1,5 +1,35 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
|
@ -27,5 +57,8 @@
|
|||
/* Patch version of this package */
|
||||
#undef PACKAGE_VERSION_PATCHLEVEL
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,21 +21,29 @@ dnl
|
|||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ([2.57])
|
||||
AC_INIT(xrandr,[1.2.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xrandr)
|
||||
AC_INIT(xrandr,[1.2.99.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xrandr)
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
|
||||
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
|
||||
XORG_MACROS_VERSION(1.2)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
XORG_CWARNFLAGS
|
||||
|
||||
AC_CHECK_LIB(m,floor)
|
||||
# Checks for pkg-config packages
|
||||
PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2.0 xrender x11)
|
||||
PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2.99.3 xrender x11)
|
||||
XRANDR_CFLAGS="$CWARNFLAGS $XRANDR_CFLAGS"
|
||||
AC_SUBST(XRANDR_CFLAGS)
|
||||
AC_SUBST(XRANDR_LIBS)
|
||||
|
||||
XORG_MANPAGE_SECTIONS
|
||||
XORG_RELEASE_VERSION
|
||||
XORG_CHANGELOG
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
|
|
|
@ -0,0 +1,555 @@
|
|||
/*
|
||||
* Copyright © 2008 Keith Packard
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting documentation, and
|
||||
* that the name of the copyright holders not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. The copyright holders make no representations
|
||||
* about the suitability of this software for any purpose. It is provided "as
|
||||
* is" without express or implied warranty.
|
||||
*
|
||||
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
autoload Process;
|
||||
autoload Nichrome;
|
||||
autoload Nichrome::Box;
|
||||
autoload Nichrome::Label;
|
||||
autoload Nichrome::Button;
|
||||
|
||||
extend namespace Nichrome {
|
||||
public namespace Quad {
|
||||
public typedef quad_t;
|
||||
public typedef widget_t + struct {
|
||||
point_t[4] p;
|
||||
real line_width;
|
||||
real corner_diameter;
|
||||
rgba_color_t line_color;
|
||||
rgba_color_t corner_color;
|
||||
bool down;
|
||||
bool started;
|
||||
int active;
|
||||
void(&quad_t) callback;
|
||||
} quad_t;
|
||||
|
||||
protected void outline (cairo_t cr, &quad_t quad) {
|
||||
for (int i = 0; i < dim (quad.p); i++) {
|
||||
arc (cr, quad.p[i].x, quad.p[i].y,
|
||||
quad.corner_diameter / 2, 0, 2 * pi);
|
||||
close_path (cr);
|
||||
}
|
||||
}
|
||||
|
||||
void text_at (cairo_t cr, point_t p, string text) {
|
||||
text_extents_t e = text_extents (cr, text);
|
||||
p.x = p.x - e.width / 2 - e.x_bearing;
|
||||
p.y = p.y - e.height / 2 - e.y_bearing;
|
||||
move_to (cr, p.x, p.y);
|
||||
show_text (cr, text);
|
||||
}
|
||||
|
||||
protected void draw (cairo_t cr, &quad_t quad) {
|
||||
if (!quad.started) {
|
||||
quad.p[2].x = quad.p[1].x = quad.geometry.width;
|
||||
quad.p[3].y = quad.p[2].y = quad.geometry.height;
|
||||
quad.started = true;
|
||||
}
|
||||
rectangle (cr, 0, 0, quad.geometry.width, quad.geometry.height);
|
||||
set_source_rgba (cr, 0, 0, 0, .25);
|
||||
fill (cr);
|
||||
for (int i = 0; i < dim (quad.p); i++)
|
||||
line_to (cr, quad.p[i].x, quad.p[i].y);
|
||||
close_path (cr);
|
||||
set_line_width (cr, quad.line_width);
|
||||
set_source_rgba (cr, quad.line_color.red, quad.line_color.green,
|
||||
quad.line_color.blue, quad.line_color.alpha);
|
||||
set_line_join (cr, line_join_t.ROUND);
|
||||
stroke (cr);
|
||||
set_source_rgba (cr, quad.corner_color.red, quad.corner_color.green,
|
||||
quad.corner_color.blue, quad.corner_color.alpha);
|
||||
outline (cr, &quad);
|
||||
fill (cr);
|
||||
set_source_rgba (cr, 1, 1, 1, 1);
|
||||
for (int i = 0; i < dim (quad.p); i++)
|
||||
text_at (cr, quad.p[i], sprintf ("%d", i));
|
||||
}
|
||||
|
||||
int nearest (&quad_t quad, point_t p) {
|
||||
real best_dist2 = 0;
|
||||
int best = 0;
|
||||
|
||||
for (int i = 0; i < dim (quad.p); i++) {
|
||||
real dist2 = ((p.x - quad.p[i].x) ** 2 +
|
||||
(p.y - quad.p[i].y) ** 2);
|
||||
if (i == 0 || dist2 < best_dist2) {
|
||||
best_dist2 = dist2;
|
||||
best = i;
|
||||
}
|
||||
}
|
||||
return best;
|
||||
}
|
||||
|
||||
protected void button (&quad_t quad, &button_event_t event) {
|
||||
enum switch (event.type) {
|
||||
case press:
|
||||
quad.down = true;
|
||||
quad.active = nearest (&quad, event);
|
||||
break;
|
||||
case release:
|
||||
quad.down = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected void motion (&quad_t quad, &motion_event_t motion) {
|
||||
if (quad.down) {
|
||||
motion.x = max (0, min (quad.geometry.width, motion.x));
|
||||
motion.y = max (0, min (quad.geometry.height, motion.y));
|
||||
quad.p[quad.active].x = motion.x;
|
||||
quad.p[quad.active].y = motion.y;
|
||||
quad.callback (&quad);
|
||||
Widget::reoutline (&quad);
|
||||
Widget::redraw (&quad);
|
||||
}
|
||||
}
|
||||
|
||||
protected void configure (&quad_t quad,
|
||||
rect_t geometry)
|
||||
{
|
||||
if (quad.geometry.width > 0 && quad.geometry.height > 0)
|
||||
{
|
||||
real x_scale = geometry.width / quad.geometry.width;
|
||||
real y_scale = geometry.height / quad.geometry.height;
|
||||
for (int i = 0; i< 4; i++) {
|
||||
quad.p[i].x *= x_scale;
|
||||
quad.p[i].y *= y_scale;
|
||||
}
|
||||
}
|
||||
Widget::configure (&quad, geometry);
|
||||
quad.callback (&quad);
|
||||
}
|
||||
|
||||
protected void init (&quad_t quad,
|
||||
&nichrome_t nichrome,
|
||||
void (&quad_t) callback) {
|
||||
Widget::init (&nichrome, &quad);
|
||||
quad.outline = outline;
|
||||
quad.draw = draw;
|
||||
quad.button = button;
|
||||
quad.motion = motion;
|
||||
quad.configure = configure;
|
||||
quad.p = (point_t[4]) {
|
||||
{ x = 0, y = 0 } ...
|
||||
};
|
||||
quad.line_color = (rgba_color_t) {
|
||||
red = 1, green = 0, blue = 0, alpha = .5
|
||||
};
|
||||
quad.line_width = 10;
|
||||
quad.corner_color = (rgba_color_t) {
|
||||
red = 0, green = 0, blue = 1, alpha = 0.75
|
||||
};
|
||||
quad.corner_diameter = 20;
|
||||
quad.down = false;
|
||||
quad.active = -1;
|
||||
quad.callback = callback;
|
||||
quad.started = false;
|
||||
}
|
||||
|
||||
protected *quad_t new (&nichrome_t nichrome, void(&quad_t) callback) {
|
||||
quad_t quad;
|
||||
|
||||
init (&quad, &nichrome, callback);
|
||||
return &quad;
|
||||
}
|
||||
}
|
||||
}
|
||||
import Nichrome;
|
||||
import Nichrome::Box;
|
||||
import Nichrome::Label;
|
||||
import Nichrome::Button;
|
||||
import Nichrome::Quad;
|
||||
|
||||
import Cairo;
|
||||
typedef real[3,3] m_t;
|
||||
typedef point_t[4] q_t;
|
||||
|
||||
/*
|
||||
* Ok, given an source quad and a dest rectangle, compute
|
||||
* a transform that maps the rectangle to q. That's easier
|
||||
* as the rectangle has some nice simple properties. Invert
|
||||
* the matrix to find the opposite mapping
|
||||
*
|
||||
* q0 q1
|
||||
*
|
||||
* q3 q2
|
||||
*
|
||||
* | m00 m01 m02 |
|
||||
* | m10 m11 m12 |
|
||||
* | m20 m21 m22 |
|
||||
*
|
||||
* m [ 0 0 1 ] = q[0]
|
||||
*
|
||||
* Set m22 to 1, and solve:
|
||||
*
|
||||
* | m02 , m12 , 1 | = | q0x, q0y, 1 |
|
||||
*
|
||||
* | m00 * w + q0x m10 * w + q0y |
|
||||
* | ------------- , ------------- , 1 | = | q1x, q1y, 1 |
|
||||
* | m20 * w + 1 m20 * w + 1 |
|
||||
|
||||
* m00*w + q0x = q1x*(m20*w + 1)
|
||||
* m00 = m20*q1x + (q1x - q0x) / w;
|
||||
*
|
||||
* m10*w + q0y = q1y*(m20*w + 1)
|
||||
* m10 = m20*q1y + (q1y - q0y) / w;
|
||||
*
|
||||
* m01*h + q0x = q3x*(m21*h + 1)
|
||||
* m01 = m21*q3x + (q3x - q0x) / h;
|
||||
*
|
||||
* m11*h + q0y = q3y*(m21*h + 1)
|
||||
* m11 = m21*q3y + (q3y - q0y) / h
|
||||
*
|
||||
* m00*w + m01*h + q0x = q2x*(m20*w + m21*h + 1)
|
||||
*
|
||||
* m20*q1x*w + q1x - q0x + m21*q3x*h + q3x - q0x + q0x = m20*q2x*w + m21*q2x*h + q2x
|
||||
*
|
||||
* m20*q1x*w - m20*q2x*w = m21*q2x*h - m21*q3x*h + q2x - q1x + q0x - q3x + q0x - q0x
|
||||
*
|
||||
* m20*(q1x - q2x)*w = m21*(q2x - q3x)*h + q2x - q1x - q3x + q0x
|
||||
*
|
||||
*
|
||||
* m10*w + m11*h + q0y = q2y*(m20*w + m21*h + 1)
|
||||
*
|
||||
* m20*q1y*w + q1y - q0y + m21*q3y*h + q3y - q0y + q0y = m20*q2y*w + m21*q2y*h + q2y
|
||||
*
|
||||
* m20*q1y*w - m20*q2y*w = m21*q2y*h - m21*q3y*h + q2y - q1y + q0y - q3y + q0y - q0y
|
||||
*
|
||||
* m20*(q1y - q2y)*w = m21*(q2y - q3y)*h + q2y - q1y - q3y + q0y
|
||||
*
|
||||
*
|
||||
* m20*(q1x - q2x)*(q1y - q2y)*w = m21*(q2x - q3x)*(q1y - q2y)*h + (q2x - q1x - q3x + q0x)*(q1y - q2y)
|
||||
*
|
||||
* m20*(q1y - q2y)*(q1x - q2x)*w = m21*(q2y - q3y)*(q1x - q2x)*h + (q2y - q1y - q3y + q0y)*(q1x - q2x)
|
||||
*
|
||||
* 0 = m21*((q2x - q3x)*(q1y - q2y) - (q2y - q3y)*(q1x - q2x))*h + (stuff)
|
||||
* = m21 * a + b;
|
||||
*
|
||||
* m21 = -(stuff) / (other stuff)
|
||||
*
|
||||
* m20 = f(m21)
|
||||
*
|
||||
* m00 = f(m20)
|
||||
* m10 = f(m20)
|
||||
*
|
||||
* m01 = f(m21)
|
||||
* m11 = f(m21)
|
||||
*
|
||||
* done.
|
||||
*/
|
||||
m_t solve (q_t q, real w, real h)
|
||||
{
|
||||
real q0x = q[0].x, q0y = q[0].y;
|
||||
real q1x = q[1].x, q1y = q[1].y;
|
||||
real q2x = q[2].x, q2y = q[2].y;
|
||||
real q3x = q[3].x, q3y = q[3].y;
|
||||
real m00, m01, m02;
|
||||
real m10, m11, m12;
|
||||
real m20, m21, m22;
|
||||
|
||||
m02 = q0x;
|
||||
m12 = q0y;
|
||||
m22 = 1;
|
||||
|
||||
real a = ((q2x - q3x)*(q1y - q2y) - (q2y - q3y)*(q1x - q2x)) * h;
|
||||
real b = (q2x - q1x - q3x + q0x) * (q1y - q2y) - (q2y - q1y - q3y + q0y) * (q1x - q2x);
|
||||
m21 = - b / a;
|
||||
|
||||
if (q1x != q2x)
|
||||
m20 = (m21 * (q2x - q3x) * h + q2x - q1x - q3x + q0x) / ((q1x - q2x) * w);
|
||||
else
|
||||
m20 = (m21 * (q2y - q3y) * h + q2y - q1y - q3y + q0y) / ((q1y - q2y) * w);
|
||||
|
||||
m00 = m20 * q1x + (q1x - q0x) / w;
|
||||
m10 = m20 * q1y + (q1y - q0y) / w;
|
||||
|
||||
m01 = m21 * q3x + (q3x - q0x) / h;
|
||||
m11 = m21 * q3y + (q3y - q0y) / h;
|
||||
|
||||
return (m_t) {
|
||||
{ m00, m01, m02 },
|
||||
{ m10, m11, m12 },
|
||||
{ m20, m21, m22 } };
|
||||
}
|
||||
|
||||
m_t
|
||||
invert (m_t m)
|
||||
{
|
||||
real det;
|
||||
int i, j;
|
||||
m_t r;
|
||||
|
||||
static int[3] a = { 2, 2, 1 };
|
||||
static int[3] b = { 1, 0, 0 };
|
||||
|
||||
det = 0;
|
||||
for (i = 0; i < 3; i++) {
|
||||
real p;
|
||||
int ai = a[i];
|
||||
int bi = b[i];
|
||||
p = m[i,0] * (m[ai,2] * m[bi,1] - m[ai,1] * m[bi,2]);
|
||||
if (i == 1)
|
||||
p = -p;
|
||||
det += p;
|
||||
}
|
||||
det = 1/det;
|
||||
for (j = 0; j < 3; j++) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
real p;
|
||||
int ai = a[i];
|
||||
int aj = a[j];
|
||||
int bi = b[i];
|
||||
int bj = b[j];
|
||||
|
||||
p = m[ai,aj] * m[bi,bj] - m[ai,bj] * m[bi,aj];
|
||||
if (((i + j) & 1) != 0)
|
||||
p = -p;
|
||||
r[j,i] = det * p;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
m_t
|
||||
rescale (m_t m, real limit)
|
||||
{
|
||||
real max = 0;
|
||||
for (int j = 0; j < 3; j++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
if ((real v = abs (m[j,i])) > max)
|
||||
max = v;
|
||||
real scale = limit / max;
|
||||
for (int j = 0; j < 3; j++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
m[j,i] *= scale;
|
||||
return m;
|
||||
|
||||
}
|
||||
|
||||
string
|
||||
m_print (m_t m)
|
||||
{
|
||||
/*
|
||||
return sprintf ("%.8f,%.8f,%.8f,%.8f,%.8f,%.8f,%.8f,%.8f,%.8f",
|
||||
m[0,0],m[0,1],m[0,2],
|
||||
m[1,0],m[1,1],m[1,2],
|
||||
m[2,0],m[2,1],m[2,2]);
|
||||
*/
|
||||
return sprintf ("%v,%v,%v,%v,%v,%v,%v,%v,%v",
|
||||
m[0,0],m[0,1],m[0,2],
|
||||
m[1,0],m[1,1],m[1,2],
|
||||
m[2,0],m[2,1],m[2,2]);
|
||||
}
|
||||
|
||||
int
|
||||
fixed (real x)
|
||||
{
|
||||
return floor (x * 65536 + 0.5) & 0xffffffff;
|
||||
}
|
||||
|
||||
void
|
||||
m_print_fix (m_t m)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
printf (" { 0x%08x, 0x%08x, 0x%08x },\n",
|
||||
fixed (m[i,0]), fixed (m[i,1]), fixed (m[i,2]));
|
||||
}
|
||||
}
|
||||
|
||||
string
|
||||
m_row (m_t m, int row)
|
||||
{
|
||||
return sprintf ("%10.5f %10.5f %10.5f",
|
||||
m[row,0],m[row,1],m[row,2]);
|
||||
}
|
||||
|
||||
Cairo::point_t[*] scale(Cairo::point_t[*] p, real w, real h)
|
||||
{
|
||||
for (int i = 0; i < dim (p); i++) {
|
||||
p[i].x *= w;
|
||||
p[i].y *= h;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
string name;
|
||||
rect_t geometry;
|
||||
} output_t;
|
||||
|
||||
autoload Process;
|
||||
|
||||
|
||||
output_t[*] get_outputs () {
|
||||
output_t[...] outputs = {};
|
||||
twixt (file randr = Process::popen (Process::popen_direction.read,
|
||||
false, "xrandr", "xrandr");
|
||||
File::close (randr))
|
||||
{
|
||||
while (!File::end (randr)) {
|
||||
string[*] words = String::wordsplit (File::fgets (randr), " ");
|
||||
if (dim (words) >= 3 && words[1] == "connected" &&
|
||||
File::sscanf (words[2], "%dx%d+%d+%d",
|
||||
&(int width), &(int height),
|
||||
&(int x), &(int y)) == 4)
|
||||
{
|
||||
outputs[dim(outputs)] = (output_t) {
|
||||
name = words[0],
|
||||
geometry = {
|
||||
x = x, y = y, width = width, height = height
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
return outputs;
|
||||
}
|
||||
|
||||
void main ()
|
||||
{
|
||||
m_t m = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } }, m_i, m_r;
|
||||
bool m_available = true;
|
||||
output_t[*] outputs = get_outputs ();
|
||||
output_t target_output;
|
||||
|
||||
if (dim (outputs) == 0) {
|
||||
File::fprintf (stderr, "%s: No enabled outputs\n", argv[0]);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (dim (argv) > 1) {
|
||||
int i;
|
||||
for (i = 0; i < dim (outputs); i++)
|
||||
if (argv[1] == outputs[i].name) {
|
||||
target_output = outputs[i];
|
||||
break;
|
||||
}
|
||||
if (i == dim (outputs)) {
|
||||
File::fprintf (stderr, "%s: no enabled output \"%s\"\n",
|
||||
argv[0], argv[1]);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
else
|
||||
target_output = outputs[0];
|
||||
|
||||
real target_width = target_output.geometry.width;
|
||||
real target_height = target_output.geometry.height;
|
||||
|
||||
real screen_width = 0;
|
||||
real screen_height = 0;
|
||||
|
||||
for (int i = 0; i < dim (outputs); i++)
|
||||
{
|
||||
screen_width = max (screen_width,
|
||||
outputs[i].geometry.x +
|
||||
outputs[i].geometry.width);
|
||||
screen_height = max (screen_height,
|
||||
outputs[i].geometry.y +
|
||||
outputs[i].geometry.height);
|
||||
}
|
||||
|
||||
&nichrome_t nichrome = Nichrome::new ("Keystone Correction", 400, 350);
|
||||
|
||||
(*label_t)[3] label;
|
||||
&label_t space = Label::new (&nichrome, "");
|
||||
for (int i = 0; i < 3; i++) {
|
||||
label[i] = Label::new (&nichrome, "matrix");
|
||||
label[i]->font = "sans-9";
|
||||
}
|
||||
|
||||
void callback (&quad_t quad) {
|
||||
real w = quad.geometry.width;
|
||||
real h = quad.geometry.height;
|
||||
string[3] text;
|
||||
try {
|
||||
m = solve (scale (quad.p, target_width / w, target_height / h),
|
||||
target_width, target_height);
|
||||
m_i = invert (m);
|
||||
m_r = rescale (m_i, 16384);
|
||||
for (int i = 0; i < 3; i++)
|
||||
text[i] = m_row (m_i,i);
|
||||
m_available = true;
|
||||
} catch divide_by_zero (real a, real b) {
|
||||
text = (string[3]) { "no solution", "" ... };
|
||||
m_available = false;
|
||||
}
|
||||
for (int i = 0; i < 3; i++)
|
||||
Label::relabel (label[i], text[i]);
|
||||
}
|
||||
&quad_t quad = Quad::new (&nichrome, callback);
|
||||
|
||||
void doit_func (&widget_t widget, bool state)
|
||||
{
|
||||
if (m_available)
|
||||
{
|
||||
Process::system ("xrandr",
|
||||
"xrandr",
|
||||
"--fb",
|
||||
sprintf ("%dx%d", screen_width, screen_height),
|
||||
"--output",
|
||||
target_output.name,
|
||||
"--transform",
|
||||
m_print (m_r));
|
||||
}
|
||||
}
|
||||
|
||||
&button_t doit = Button::new (&nichrome, "doit", doit_func);
|
||||
|
||||
void show_func (&widget_t widget, bool state)
|
||||
{
|
||||
if (m_available)
|
||||
{
|
||||
printf ("normal: %s\n", m_print (m));
|
||||
printf ("inverse: %s\n", m_print (m_i));
|
||||
printf ("scaled: %s\n", m_print (m_r));
|
||||
printf ("fixed:\n");
|
||||
m_print_fix (m_i);
|
||||
}
|
||||
}
|
||||
|
||||
&button_t show = Button::new (&nichrome, "show", show_func);
|
||||
&button_t quit = Button::new (&nichrome, "quit",
|
||||
void func (&widget_t w, bool state) {
|
||||
w.nichrome.running = false;
|
||||
});
|
||||
|
||||
&box_t hbox = Box::new (Box::dir_t.horizontal,
|
||||
Box::widget_item (&doit, 0),
|
||||
Box::widget_item (&show, 0),
|
||||
|
||||
Box::widget_item (&quit, 0),
|
||||
Box::glue_item (1));
|
||||
&box_t box = Box::new (Box::dir_t.vertical,
|
||||
Box::box_item (&hbox),
|
||||
Box::widget_item (label[0], 0),
|
||||
Box::widget_item (label[1], 0),
|
||||
Box::widget_item (label[2], 0),
|
||||
Box::widget_item (&space, 0),
|
||||
Box::widget_item (&quad, 1));
|
||||
Nichrome::set_box (&nichrome, &box);
|
||||
Nichrome::main_loop (&nichrome);
|
||||
}
|
||||
|
||||
main ();
|
730
xrandr/xrandr.c
730
xrandr/xrandr.c
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,6 @@
|
|||
.\"
|
||||
.\" Copyright 2001 Keith Packard.\"
|
||||
.\" Copyright 2001 Keith Packard
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, distribute, and sell this software and its
|
||||
.\" documentation for any purpose is hereby granted without fee, provided that
|
||||
.\" the above copyright notice appear in all copies and that both that
|
||||
|
@ -29,42 +30,60 @@ xrandr \- primitive command line interface to RandR extension
|
|||
[\-help] [\-display \fIdisplay\fP]
|
||||
[\-q] [\-v]
|
||||
[\-\-verbose]
|
||||
[\-\-dryrun]
|
||||
[\-\-screen \fIsnum\fP]
|
||||
[\-\-q1]
|
||||
[\-\-q12]
|
||||
.br
|
||||
.B RandR version 1.3 options
|
||||
.br
|
||||
[\-\-current]
|
||||
[\-\-noprimary]
|
||||
.br
|
||||
.B Per-output options
|
||||
.br
|
||||
[\-\-panning \fIwidth\fPx\fIheight\fP[+\fIx\fP+\fIy\fP[/\fItrack_width\fPx\fItrack_height\fP+\fItrack_x\fP+\fItrack_y\fP[/\fIborder_left\fP/\fIborder_top\fP/\fIborder_right\fP/\fIborder_bottom\fP]]]]
|
||||
[\-\-scale \fIx\fPx\fIy\fP]
|
||||
[\-\-transform \fIa\fP,\fIb\fP,\fIc\fP,\fId\fP,\fIe\fP,\fIf\fP,\fIg\fP,\fIh\fP,\fIi\fP]
|
||||
[\-\-primary]
|
||||
.br
|
||||
.B RandR version 1.2 options
|
||||
.br
|
||||
[\-\-prop]
|
||||
[\-\-fb <width>x<height>]
|
||||
[\-\-fbmm <width>x<height>]
|
||||
[\-\-dpi <dpi>]
|
||||
[\-\-fb \fIwidth\fPx\fIheight\fP]
|
||||
[\-\-fbmm \fIwidth\fPx\fIheight\fP]
|
||||
[\-\-dpi \fIdpi\fP]
|
||||
[\-\-newmode \fIname\fP \fImode\fP]
|
||||
[\-\-rmmode \fIname\fP]
|
||||
[\-\-addmode \fIoutput\fP \fIname\fP]
|
||||
[\-\-delmode \fIoutput\fP \fIname\fP]
|
||||
.br
|
||||
.B Per-output options
|
||||
.br
|
||||
[\-\-output <output>]
|
||||
[\-\-output \fIoutput\fP]
|
||||
[\-\-auto]
|
||||
[\-\-mode <mode>]
|
||||
[\-\-mode \fImode\fP]
|
||||
[\-\-preferred]
|
||||
[\-\-pos <x>x<y>]
|
||||
[\-\-rate <rate>]
|
||||
[\-\-pos \fIx\fPx\fIy\fP]
|
||||
[\-\-rate \fIrate\fP]
|
||||
[\-\-reflect \fIreflection\fP]
|
||||
[\-\-rotate \fIorientation\fP]
|
||||
[\-\-left\-of <output>\]
|
||||
[\-\-right\-of <output>\]
|
||||
[\-\-above <output>\]
|
||||
[\-\-below <output>\]
|
||||
[\-\-same-as <output>\]
|
||||
[\-\-set <property> <value>]
|
||||
[\-\-left\-of \fIoutput\fP\]
|
||||
[\-\-right\-of \fIoutput\fP\]
|
||||
[\-\-above \fIoutput\fP\]
|
||||
[\-\-below \fIoutput\fP\]
|
||||
[\-\-same-as \fIoutput\fP\]
|
||||
[\-\-set \fIproperty\fP \fIvalue\fP]
|
||||
[\-\-off]
|
||||
[\-\-crtc <crtc>]
|
||||
[\-\-newmode <name> \fImode\fP]
|
||||
[\-\-rmmode <name>]
|
||||
[\-\-addmode <output> <name>]
|
||||
[\-\-delmode <output> <name>]
|
||||
[\-\-crtc \fIcrtc\fP]
|
||||
[\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP]
|
||||
|
||||
.br
|
||||
.B RandR version 1.0 and version 1.1 options
|
||||
.br
|
||||
[\-o \fIorientation\fP]
|
||||
[\-s \fIsize\fP]
|
||||
[\-r \fIrate\fP]
|
||||
[\-x] [\-y]
|
||||
.SH DESCRIPTION
|
||||
.I Xrandr
|
||||
|
@ -77,59 +96,141 @@ mode and a '*' after the current mode.
|
|||
|
||||
There are a few global options. Other options modify the last output that is
|
||||
specified in earlier parameters in the command line. Multiple outputs may
|
||||
be modified at the same time by passing mutiple \-\-output options followed
|
||||
be modified at the same time by passing multiple \-\-output options followed
|
||||
immediately by their corresponding modifying options.
|
||||
.IP \-\-help
|
||||
.IP \-help
|
||||
Print out a summary of the usage and exit.
|
||||
.IP \-v
|
||||
.IP "\-v, \-\-version"
|
||||
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
|
||||
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
|
||||
.IP "\-q, \-\-query"
|
||||
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"
|
||||
xrandr will display the current state of the system.
|
||||
.IP "\-\-dryrun"
|
||||
Performs all the actions specified except that no changes are made.
|
||||
.IP "\-d, \-display \fIname\fP"
|
||||
This option selects the X display to use. Note this refers to the X
|
||||
screen abstraction, not the monitor (or output).
|
||||
.IP "\-\-screen \fIsnum\fP"
|
||||
This option selects which screen to manipulate. Note this refers to the X
|
||||
screen abstraction, not the monitor (or output).
|
||||
.IP \-\-q1
|
||||
Forces the usage of the RandR version 1.1 protocol, even if a higher version
|
||||
is available.
|
||||
.IP \-\-q12
|
||||
Forces the usage of the RandR version 1.2 protocol, even if the display does
|
||||
not report it as supported or a higher version is available.
|
||||
.PP
|
||||
.SH "RandR version 1.3 options"
|
||||
.PP
|
||||
Options for RandR 1.3 are used as a superset of the options for RandR 1.2.
|
||||
.PP
|
||||
.IP \-\-current
|
||||
Return the current screen configuration, without polling for hardware changes.
|
||||
.IP \-\-noprimary
|
||||
Don't define a primary output.
|
||||
.PP
|
||||
.B "Per-output options"
|
||||
.IP "\-\-panning \fIwidth\fPx\fIheight\fP[+\fIx\fP+\fIy\fP[/\fItrack_width\fPx\fItrack_height\fP+\fItrack_x\fP+\fItrack_y\fP[/\fIborder_left\fP/\fIborder_top\fP/\fIborder_right\fP/\fIborder_bottom\fP]]]"
|
||||
This option sets the panning parameters. As soon as panning is
|
||||
enabled, the CRTC position can change with every pointer move.
|
||||
The first four parameters specify the total panning area, the next four the
|
||||
pointer tracking area (which defaults to the same area). The last four
|
||||
parameters specify the border and default to 0. A width or height set to zero
|
||||
disables panning on the according axis. You typically have to set the screen
|
||||
size with \fI--fb\fP simultaneously.
|
||||
.IP "\-\-transform \fIa\fP,\fIb\fP,\fIc\fP,\fId\fP,\fIe\fP,\fIf\fP,\fIg\fP,\fIh\fP,\fIi\fP"
|
||||
Specifies a transformation matrix to apply on the output. Automatically a bilinear filter is selected.
|
||||
The mathematical form corresponds to:
|
||||
.RS
|
||||
.RS
|
||||
a b c
|
||||
.br
|
||||
d e f
|
||||
.br
|
||||
g h i
|
||||
.RE
|
||||
The transformation matrix multiplied by a coordinate vector of a pixel of the
|
||||
output (extended to 3 values) gives the approximate coordinate vector of a pixel
|
||||
in the graphic buffer. Typically, \fIa\fP and
|
||||
\fIe\fP corresponds to the scaling on the X and Y axes, \fIc\fP and \fIf\fP
|
||||
corresponds to the tranlastion on those axes, and \fIg\fP, \fIh\fP, and \fIi\fP
|
||||
are respectively 0, 0 and 1. It also allows to express a rotation of an angle T
|
||||
with:
|
||||
.RS
|
||||
cos T -sin T 0
|
||||
.br
|
||||
sin T cos T 0
|
||||
.br
|
||||
0 0 1
|
||||
.RE
|
||||
As a special argument, instead of
|
||||
passing a matrix, one can pass the string \fInone\fP, in which case the default
|
||||
values are used (a unit matrix without filter).
|
||||
.IP "\-\-scale \fIx\fPx\fIy\fP"
|
||||
Changes the dimensions of the output picture. Values superior to 1 will lead to
|
||||
a compressed screen (screen dimension bigger than the dimension of the output
|
||||
mode), and values below 1 leads to a zoom in on the output. This option is
|
||||
actually a shortcut version of the \fI\-\-transform\fP option.
|
||||
.IP \-\-primary
|
||||
Set the output as primary.
|
||||
It will be sorted first in Xinerama and RANDR geometry requests.
|
||||
.PP
|
||||
.SH "RandR version 1.2 options"
|
||||
These options are only available for X server supporting RandR version 1.2
|
||||
or newer.
|
||||
.IP \-\-prop
|
||||
.IP "\-\-prop, \-\-properties"
|
||||
This option causes xrandr to display the contents of properties for each
|
||||
output. \-\-verbose also enables \-\-prop.
|
||||
.IP "\-\-fb <width>x<height>"
|
||||
.IP "\-\-fb \fIwidth\fPx\fIheight\fP"
|
||||
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>"
|
||||
.IP "\-\-fbmm \fIwidth\fPx\fIheight\fP"
|
||||
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>"
|
||||
.IP "\-\-dpi \fIdpi\fP"
|
||||
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.
|
||||
.IP "\-\-newmode \fIname\fP \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. Several
|
||||
tools permit to compute the usual modeline from a height, width, and refresh
|
||||
rate, for instance you can use \fBcvt\fR.
|
||||
.IP "\-\-rmmode \fIname\fP"
|
||||
This removes a mode from the server if it is otherwise unused.
|
||||
.IP "\-\-addmode \fIoutput\fP \fIname\fP"
|
||||
Add a mode to the set of valid modes for an output.
|
||||
.IP "\-\-delmode \fIoutput\fP \fIname\fP"
|
||||
Remove a mode from the set of valid modes for an output.
|
||||
.PP
|
||||
.B "Per-output options"
|
||||
.IP "\-\-output <output>"
|
||||
.IP "\-\-output \fIoutput\fP"
|
||||
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 "\-\-mode \fImode\fP"
|
||||
This selects a mode. Use either the name or the XID for \fImode\fP
|
||||
.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>"
|
||||
.IP "\-\-pos \fIx\fPx\fIy\fP"
|
||||
Position the output within the screen using pixel coordinates. In case reflection
|
||||
or rotation is applied, the translation is applied after the effects.
|
||||
.IP "\-\-rate \fIrate\fP"
|
||||
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.
|
||||
|
@ -138,54 +239,77 @@ 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>"
|
||||
the output contents to be rotated in the specified direction. 'right' specifies
|
||||
a clockwise rotation of the picture and 'left' specifies a counter-clockwise
|
||||
rotation.
|
||||
.IP "\-\-left\-of, \-\-right\-of, \-\-above, \-\-below, \-\-same-as \fIanother-output\fP"
|
||||
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>"
|
||||
.IP "\-\-set \fIproperty\fP \fIvalue\fP"
|
||||
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>"
|
||||
.IP "\-\-crtc \fIcrtc\fP"
|
||||
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.
|
||||
.IP "\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP"
|
||||
Set the specified floating point values as gamma correction on the crtc
|
||||
currently attached to this output. Note that you cannot get two different values
|
||||
for cloned outputs and that switching an output to another crtc doesn't change
|
||||
the crtc gamma corrections at all.
|
||||
.PP
|
||||
.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>"
|
||||
.IP "\-s, \-\-size \fIsize-index\fP or \-\-size \fIwidth\fPx\fIheight\fP"
|
||||
This sets the screen size, either matching by size or using the index into
|
||||
the list of available sizes.
|
||||
.IP "\-o \fIrotation\fP"
|
||||
.IP "\-r, \-\-rate, \-\-refresh \fIrate\fP"
|
||||
This sets the refresh rate closest to the specified value.
|
||||
.IP "\-o, \-\-orientation \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 EXAMPLES
|
||||
Sets an output called LVDS to its preferred mode, and on its right put an
|
||||
output called VGA to preferred mode of a screen which has been physically rotated clockwise:
|
||||
.RS
|
||||
xrandr --output LVDS --auto --rotate normal --pos 0x0 --output VGA --auto --rotate left --right-of LVDS
|
||||
.RE
|
||||
.PP
|
||||
Forces to use a 1024x768 mode on an output called VGA:
|
||||
.RS
|
||||
xrandr --newmode "1024x768" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync
|
||||
.br
|
||||
xrandr --addmode VGA 1024x768
|
||||
.br
|
||||
xrandr --output VGA --mode 1024x768
|
||||
.RE
|
||||
.PP
|
||||
Enables panning on a 1600x768 desktop while displaying 1024x768 mode on an output called VGA:
|
||||
.RS
|
||||
xrandr --fb 1600x768 --output VGA --mode 1024x768 --panning 1600x0
|
||||
.RE
|
||||
.PP
|
||||
Have one small 1280x800 LVDS screen showing a small version of a huge 3200x2000 desktop, and have a
|
||||
big VGA screen display the surrounding of the mouse at normal size.
|
||||
.RS
|
||||
xrandr --fb 3200x2000 --output LVDS --scale 2.5x2.5 --output VGA --pos 0x0 --panning 3200x2000+0+0/3200x2000+0+0/64/64/64/64
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
Xrandr(3)
|
||||
Xrandr(3), cvt(1)
|
||||
.SH AUTHORS
|
||||
Keith Packard,
|
||||
Open Source Technology Center, Intel Corporation.
|
||||
|
|
Loading…
Reference in New Issue