xorg/xrandr
9 years agoxrandr 1.4.3 xrandr-1.4.3
Aaron Plattner [Sat, 2 Aug 2014 06:14:42 +0000 (23:14 -0700)] 
xrandr 1.4.3

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
9 years agoMerge commit '193a358'
Aaron Plattner [Sat, 2 Aug 2014 06:10:46 +0000 (23:10 -0700)] 
Merge commit '193a358'

Conflicts:
xrandr.c

9 years agoMention of --brightness with -h option
Stéphane Aulery [Sat, 29 Jun 2013 23:50:25 +0000 (16:50 -0700)] 
Mention of --brightness with -h option

Reported by jidanni at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709569

Signed-off-by: Stéphane Aulery <lkppo@free.fr>
Reviewed-By: Matt Dew <marcoz@osource.org>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
9 years agoAllow -x and -y switches to undo themselves
Connor Behan [Wed, 11 Jun 2014 06:56:12 +0000 (23:56 -0700)] 
Allow -x and -y switches to undo themselves

People who want to dick around might think it is safe to run "xrandr -x"
before they know any of the other syntax. When "xrandr -x" again does
not get back to a normal screen, they are stuck having to read a manpage
with reflected text.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
9 years agoRemove duplicate printing of the axis
Connor Behan [Sun, 1 Jun 2014 23:35:50 +0000 (16:35 -0700)] 
Remove duplicate printing of the axis

Even in verbose mode, why print the same information twice?

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
9 years agoxrandr: use full range for gamma table generation
Dominik Behr [Wed, 2 Apr 2014 01:38:05 +0000 (18:38 -0700)] 
xrandr: use full range for gamma table generation

Calculate gamma table using full [0,65536) range and do not make any
assumptions about relation of gamma table size and significant bits.

Gamma table size has nothing to do with number of significant bits in hardware.
In particular we are dealing now with gamma table that has 17 entries and 8
bit precision, there are other GPUs with 10 bit precision and less than 256
entries using partial linear approximation. Deriving assumed gamma table
significant bits from size of gamma table leads to incorrect calculations and
loss of precision. Also XRandR specification never mentions that gamma tables
need to be power of 2.

Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
10 years agoRemove unnecessary parentheses.
Thomas Klausner [Fri, 28 Mar 2014 23:50:17 +0000 (00:50 +0100)] 
Remove unnecessary parentheses.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
10 years agoxrandr 1.4.2 xrandr-1.4.2
Aaron Plattner [Thu, 27 Mar 2014 18:37:07 +0000 (11:37 -0700)] 
xrandr 1.4.2

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
10 years agoxrandr: document how to disconnect RandR 1.4 providers
Aaron Plattner [Fri, 21 Mar 2014 17:35:56 +0000 (10:35 -0700)] 
xrandr: document how to disconnect RandR 1.4 providers

Commit a6217be2d5a93a4c7b48f4081a4a8e14c3c97014 restored the ability to
disconnect RandR 1.4 providers from each other, but it's not clear from the
documentation how to actually do that.  Try to clarify by mentioning it in the
man page.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
10 years agoxrandr: allow disconnecting of offload and outputs
Dave Airlie [Fri, 3 May 2013 00:05:04 +0000 (10:05 +1000)] 
xrandr: allow disconnecting of offload and outputs

Before the lookup code passing a 0 XID would disconnect,
this fixes it backup.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
10 years agoxrandr: Use floating point for VTotal when calculating refresh rate
Ville Syrjälä [Fri, 31 May 2013 14:01:54 +0000 (17:01 +0300)] 
xrandr: Use floating point for VTotal when calculating refresh rate

Interlaced modes generally have an odd VTotal, so we lose half a line
from VTotal when we divide by two. That causes the final refresh rate
to be slightly off. Make VTotal a double to avoid the problem.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
10 years agoxrandr: Use more decimal places when printing various rates
Ville Syrjälä [Fri, 31 May 2013 14:01:53 +0000 (17:01 +0300)] 
xrandr: Use more decimal places when printing various rates

Using just one decimal place for dotclock and refresh rates loses quite
a bit of information. When dealing with 60Hz vs. 59.94Hz refresh rate
modes for example, it's useful to see at least two decimal places. For
the dotclock in similar cases, three decimal places seems quite a bit
better than just one.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
10 years agoSpecial-case printing of the GUID property
Aaron Plattner [Fri, 3 Jan 2014 13:48:17 +0000 (05:48 -0800)] 
Special-case printing of the GUID property

Rather than printing GUIDs as 16 signed decimal integers, print them in
{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} format.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
10 years agoMove EDID printing into a helper function
Aaron Plattner [Fri, 3 Jan 2014 13:22:02 +0000 (05:22 -0800)] 
Move EDID printing into a helper function

Localize the specialness of EDID printing by moving it into a single function,
print_edid, which prints the binary EDID data.  Remove the is_edid parameter
from everything else.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
10 years agoSplit output property printing into a helper function
Aaron Plattner [Fri, 3 Jan 2014 13:14:35 +0000 (05:14 -0800)] 
Split output property printing into a helper function

Move the body of the code that prints the actual output property values into a
helper function.  This will make it easier for this function to select
special-case property printers for properties that need special formatting.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
10 years agoxrandr 1.4.1 xrandr-1.4.1
Alan Coopersmith [Wed, 17 Jul 2013 06:30:27 +0000 (23:30 -0700)] 
xrandr 1.4.1

10 years agoCombine usage message strings
Alan Coopersmith [Sat, 13 Jul 2013 07:11:41 +0000 (00:11 -0700)] 
Combine usage message strings

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
10 years agoDeclare capability_name() as returning const char *
Alan Coopersmith [Sat, 13 Jul 2013 07:07:26 +0000 (00:07 -0700)] 
Declare capability_name() as returning const char *

Only used as an argument to printf.   Clears gcc warnings:
xrandr.c: In function ‘capability_name’:
xrandr.c:237:2: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
xrandr.c:239:2: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
xrandr.c:241:2: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
xrandr.c:243:2: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
xrandr.c:245:5: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
10 years agoBug 56923 - Make command line options consistent (single vs double dash)
Thomas [Fri, 9 Nov 2012 14:33:08 +0000 (14:33 +0000)] 
Bug 56923 - Make command line options consistent (single vs double dash)

Most of xrandr's command line options follow the system of single
dashes for single character options (e.g. "-v") and double dashes for
long options ("--version").  The only exceptions are "-display" and
"-help", most likely for historical reasons.  To make the behavior
consistent across all options, the following patch adds "--display"
and "--help" as alternatives to the current inconsistency.  The man
page got updated as well, recommending double-dash variants for both
options. The old behavior is still supported, so the patch should not
break any existing usage/script.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
10 years agoProtect config.h like usual.
Thomas Klausner [Sun, 2 Jun 2013 19:30:39 +0000 (21:30 +0200)] 
Protect config.h like usual.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
10 years agoxrandr: calloc XRRModeInfo's passed to libXrandr.
Andy Ritger [Thu, 2 May 2013 08:20:27 +0000 (01:20 -0700)] 
xrandr: calloc XRRModeInfo's passed to libXrandr.

The "--newmode" commandline option initializes an XRRModeInfo and passes
it into XRRCreateMode().  calloc(3) it to avoid uninitialized fields.
For consistency, calloc(3) all the places where umode_t's (the wrapper
structure for XRRModeInfo) are allocated.

Signed-off-by: Andy Ritger <aritger@nvidia.com>
Tested-by: Nikhil Mahale <nmahale@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
11 years agoPrint spaces between XA_ATOM property values
Aaron Plattner [Thu, 28 Feb 2013 20:01:53 +0000 (12:01 -0800)] 
Print spaces between XA_ATOM property values

Commit b26fd532b3dab222956ea27eef4e41345978b5b2 redid how xrandr prints
properties.  It neglected to put spaces between the values of XA_ATOM
properties, so they all run together.  For example,

    audio: auto
        supported: force-dvioffautoon

Fix this by putting a space after each atom name.  In addition, some drivers
create property values with spaces in them, so put commas between entries to
disambiguate.  For example,

    Broadcast RGB: Automatic
        supported: Automatic, Full, Limited 16:235

Do the same for properties with multiple valid ranges.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoxrandr 1.4.0 xrandr-1.4.0
Aaron Plattner [Tue, 12 Feb 2013 21:24:38 +0000 (13:24 -0800)] 
xrandr 1.4.0

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
11 years agoMerge branch 'fixes'
Aaron Plattner [Tue, 12 Feb 2013 20:30:20 +0000 (12:30 -0800)] 
Merge branch 'fixes'

Conflicts:
xrandr.c

11 years agoCast XID to unsigned int to suppress a printf warning
Aaron Plattner [Wed, 6 Feb 2013 22:21:57 +0000 (14:21 -0800)] 
Cast XID to unsigned int to suppress a printf warning

Sorry I forgot about this in commit 138b6252c0cae6599b6c8a25ffa22ffe70f227c2.
That change introduced a warning:

  xrandr.c|645 col 5| warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘XID’ [-Wformat]

Fix that by just casting the XID to unsigned int.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
11 years agoBug #37043: adjust refresh rates for doublescan and interlace
Aaron Plattner [Wed, 6 Feb 2013 19:13:06 +0000 (11:13 -0800)] 
Bug #37043: adjust refresh rates for doublescan and interlace

These two flags halve and double, respectively, the effective refresh rate of a
mode.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
11 years agoBug #29603: document that there might be multiple preferred modes
Aaron Plattner [Wed, 6 Feb 2013 18:10:03 +0000 (10:10 -0800)] 
Bug #29603: document that there might be multiple preferred modes

The X server sorts the mode list for an output with preferred modes first, and
specifies how many preferred modes there are by setting the npreferred field in
the XRRModeInfo structure.

Update the man page to refer to preferred modes in the plural, and mention that
--auto and --preferred use the *first* preferred mode.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
11 years agoBug #14118: print usage() to stdout, proper errors for bad arguments
Aaron Plattner [Wed, 6 Feb 2013 22:11:23 +0000 (14:11 -0800)] 
Bug #14118: print usage() to stdout, proper errors for bad arguments

Print the usage() text to stdout instead of stderr, and then only if -help is
specified.  Also allow --help for consistency.

For other command line syntax errors, introduce a new helper function argerr()
that prints errors of the form

  xrandr: %s
  Try './xrandr --help' for more information.

and exits.  Use that to print proper error messages.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
11 years agoBug #11397: check that numeric --orientation arguments are in range
Aaron Plattner [Wed, 6 Feb 2013 21:08:58 +0000 (13:08 -0800)] 
Bug #11397: check that numeric --orientation arguments are in range

The only valid parameters to -o (--orientation) are 0, 1, 2, 3, normal, left,
inverted, and right.  xrandr converts the strings to numbers and then checks
that they're within range, but doesn't validate them if it was numeric to begin
with.

Move the range check outside of the if statement so that out-of-range numeric
values are rejected properly.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
11 years agoxrandr: Fix variable declaration warnings
Aaron Plattner [Sat, 25 Aug 2012 04:43:13 +0000 (21:43 -0700)] 
xrandr: Fix variable declaration warnings

There are piles of places in the code where a variable shadows either another
variable or a global function:

  xrandr.c:545:35: warning: declaration of ‘index’ shadows a global declaration [-Wshadow]
  xrandr.c:574:9: warning: declaration of ‘index’ shadows a global declaration [-Wshadow]
  xrandr.c:967:19: warning: declaration of ‘gamma’ shadows a global declaration [-Wshadow]
  xrandr.c:1329:16: warning: declaration of ‘gamma’ shadows a global declaration [-Wshadow]
  xrandr.c:2055:28: warning: declaration of ‘outputs’ shadows a global declaration [-Wshadow]
  xrandr.c:2068:29: warning: declaration of ‘outputs’ shadows a global declaration [-Wshadow]
  xrandr.c:2928:16: warning: declaration of ‘output’ shadows a previous local [-Wshadow]
  xrandr.c:2995:15: warning: declaration of ‘output’ shadows a previous local [-Wshadow]
  xrandr.c:3016:15: warning: declaration of ‘j’ shadows a previous local [-Wshadow]
  xrandr.c:3018:19: warning: declaration of ‘rotations’ shadows a previous local [-Wshadow]
  xrandr.c:3116:15: warning: declaration of ‘crtc’ shadows a previous local [-Wshadow]
  xrandr.c:3170:8: warning: declaration of ‘k’ shadows a previous local [-Wshadow]
  xrandr.c:3243:20: warning: declaration of ‘mode’ shadows a previous local [-Wshadow]

'index' and 'gamma' are C library functions:

  index (3)            - locate character in string
  gamma (3)            - (logarithm of the) gamma function

The rest of these are either variables or function parameters.

When possible, move the declaration of a variable into the block where it is
used, including in cases where the same variable is used in multiple blocks but
the later block doesn't depend on the value from the earlier block.

In a few cases, rename the variable in the outer scope to be more specific (e.g.
output -> config_output) so the more generic variable in the inner scope (e.g.
the 'output' variable used to iterate over all outputs) doesn't have to change.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Andy Ritger <aritger@nvidia.com>
11 years agoxrandr: look for providers by name or xid
Aaron Plattner [Tue, 5 Feb 2013 00:17:24 +0000 (16:17 -0800)] 
xrandr: look for providers by name or xid

Use the name_t infrastructure to allow specifying providers by name, index, or
XID.  This means that numbers without a "0x" prefix will now be interpreted as a
indices rather than XIDs.  To match that, print provider XIDs in hexadecimal.

Print an error if a provider-related option is specified and RandR 1.4 isn't
supported.

Make get_screen robust against being called multiple times.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
11 years agoxrandr: make providers a first-class citizen
Aaron Plattner [Tue, 5 Feb 2013 00:05:11 +0000 (16:05 -0800)] 
xrandr: make providers a first-class citizen

Create a struct _provider to match the existing output, crtc, etc. objects.
Build that from a new get_providers() function.  Use that to populate the list
when querying the providers.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
11 years agoman: document provider options
Aaron Plattner [Mon, 4 Feb 2013 23:20:21 +0000 (15:20 -0800)] 
man: document provider options

I hope I got the --setprovideroffloadsink parameters the right way around.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
11 years agoFix -Wformat warnings about passing longs where ints were expected
Alan Coopersmith [Sun, 20 Jan 2013 20:32:15 +0000 (12:32 -0800)] 
Fix -Wformat warnings about passing longs where ints were expected

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoMark fatal() and warning() as taking printf-style arguments
Alan Coopersmith [Sun, 20 Jan 2013 20:28:04 +0000 (12:28 -0800)] 
Mark fatal() and warning() as taking printf-style arguments

Silences -Wformat-nonliteral warnings about them passing through
unknown format arguments to vfprintf.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoconfig: Add missing AC_CONFIG_SRCDIR
Alan Coopersmith [Sun, 20 Jan 2013 20:24:24 +0000 (12:24 -0800)] 
config: Add missing AC_CONFIG_SRCDIR

Regroup AC statements under the Autoconf initialization section.
Regroup AM statements under the Automake initialization section.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoautogen.sh: Honor NOCONFIGURE=1
Colin Walters [Wed, 16 Jan 2013 18:02:57 +0000 (13:02 -0500)] 
autogen.sh: Honor NOCONFIGURE=1

See http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Adam Jackson <ajax@redhat.com>
11 years agoconfigure: Drop AM_MAINTAINER_MODE
Adam Jackson [Wed, 16 Jan 2013 18:03:39 +0000 (13:03 -0500)] 
configure: Drop AM_MAINTAINER_MODE

Signed-off-by: Adam Jackson <ajax@redhat.com>
11 years agoxrandr: print primary output
Pierre-Loup A. Griffais [Wed, 19 Dec 2012 20:32:03 +0000 (12:32 -0800)] 
xrandr: print primary output

Sample output:

LVDS-0 connected primary 1920x1080+1920+120 [...]

Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
11 years agoxrandr: generalize output property printing
Andy Ritger [Sat, 8 Sep 2012 00:58:46 +0000 (17:58 -0700)] 
xrandr: generalize output property printing

Signed-off-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
11 years agoxrandr: extend '--set' syntax to allow a comma-separated list of values
Andy Ritger [Sat, 8 Sep 2012 00:58:45 +0000 (17:58 -0700)] 
xrandr: extend '--set' syntax to allow a comma-separated list of values

Signed-off-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
11 years agoxrandr: add provider interfaces
Dave Airlie [Fri, 20 Jan 2012 17:40:41 +0000 (17:40 +0000)] 
xrandr: add provider interfaces

This adds an initial interface to list and configure offload and output
providers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoxrandr: Fix string constness bugs
Aaron Plattner [Sat, 25 Aug 2012 04:02:26 +0000 (21:02 -0700)] 
xrandr: Fix string constness bugs

Sufficiently new versions of GCC treat string literals as "const char *" by
default.  This means that several places that assign, return, or initialize
char* from a string literal generates a warning:

  xrandr.c:54:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:55:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:56:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:57:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:58:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:61:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:62:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:63:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:64:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:65:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:69:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:70:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:71:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:72:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:73:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:74:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:80:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:81:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:82:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:83:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:84:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:85:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:86:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:87:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:88:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:189:2: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:193:5: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:202:2: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:204:2: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:206:2: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:208:2: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:210:5: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:359:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:360:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:361:5: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:593:23: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:1189:28: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:1191:28: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:1587:39: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:1588:30: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:1589:38: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:1590:48: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:1591:42: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:1592:25: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:2544:28: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:2546:28: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:2585:28: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
  xrandr.c:3228:17: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]

Fix as many of these as possible.  This introduces one problem:
XRRSetCrtcTransform takes a non-const char* filter parameter even though it
doesn't actually modify the string.  Instead of trying to work around that, just
live with the warning for now:

  xrandr.c:1459:9: warning: passing argument 4 of ‘XRRSetCrtcTransform’ discards ‘const’ qualifier from pointer target type [enabled by default]
  /X/include/X11/extensions/Xrandr.h:383:1: note: expected ‘char *’ but argument is of type ‘const char *’

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoxrandr: compute gamma-correction in [0,2^sigbits)
Andy Ritger [Fri, 24 Aug 2012 22:53:09 +0000 (15:53 -0700)] 
xrandr: compute gamma-correction in [0,2^sigbits)

The gamma-correction lookup table values are 16:16:16 X Colors, where the
MSBs are programmed into the hardware lookup table.  Rather than compute
values over the entire range [0,65536) (where values below 2^(16 - sigbits)
will receive the same hardware value), compute values over the range
[0,2^sigbits) and left shift by (16 - sigbits) into the MSBs.

Signed-off-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
11 years agoxrandr: fix gamma == 1.0 && sigbits != 8
Andy Ritger [Fri, 24 Aug 2012 22:53:08 +0000 (15:53 -0700)] 
xrandr: fix gamma == 1.0 && sigbits != 8

The gamma-correction lookup table managed through XRR[GS]etCrtcGamma is
2^n in size, where 'n' is the number of significant bits in the X Color.
Each element in the gamma-correction lookup table is a 16:16:16 X Color
(i.e., in the range [0,65536) ).  The significant bits of each component
of each element in the lookup table are programmed into the hardware
lookup table.  Meaningful values in the gamma-correction lookup table
are thus in the range [0,2^sigbits), where all values are shifted into
the MSBs (i.e., left shifted by (16 - sigificant bits)).

Signed-off-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
11 years agoxrandr: use 1/gamma to compute gamma-correction
Andy Ritger [Fri, 24 Aug 2012 22:53:07 +0000 (15:53 -0700)] 
xrandr: use 1/gamma to compute gamma-correction

To compute a gamma *correction* lookup table, use the specified gamma
value as the divisor in (1.0/gamma).  This matches the semantics of
xgamma(1) and the "gamma-value" and "{red,green,blue}-gamma" xorg.conf(5)
options.

For more details, see:
http://www.poynton.com/PDFs/TIDV/Gamma.pdf (Gamma in computer graphics, page 17)
http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/common/xf86cmap.c:ComputeGamma()

Signed-off-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
11 years agoRunning text interspersed with options prevents DocBook translation; remove.
Eric S. Raymond [Thu, 23 Aug 2012 16:26:57 +0000 (12:26 -0400)] 
Running text interspersed with options prevents DocBook translation; remove.

The information the text conveys is not really needed at that point,
either. It's duplicated later in the manual page.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
11 years agokeystone.5c: cairo-5 box semantics changed default layout
Keith Packard [Wed, 2 May 2012 04:53:02 +0000 (21:53 -0700)] 
keystone.5c: cairo-5 box semantics changed default layout

cairo-5c version 1.6 includes a new 2D box layout widget that
needs widget stretch defined in both dimensions to create
the desired layout.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd a --scale-from option
Aaron Plattner [Mon, 23 Apr 2012 19:41:15 +0000 (12:41 -0700)] 
Add a --scale-from option

A typical case for wanting to specify a scale on an output is making your
framebuffer be one size and scaling it to fill an output of a different size.
Instead of making the user calculate the scaling factors to be specified by
--scale, add a new option, --scale-from, that lets the user specify the
framebuffer size directly.  Compute the appropriate transform to achieve the
desired target size.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Andy Ritger <aritger@nvidia.com>
12 years agoxrandr: move transform limit checking after scaling
Pierre-Loup A. Griffais [Tue, 20 Mar 2012 23:46:22 +0000 (16:46 -0700)] 
xrandr: move transform limit checking after scaling

This would trigger for legit scaled matrices, resulting in the wrong
extents getting computed.

Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
12 years agoUpdate keystone program to run with new nichrome bits
Keith Packard [Wed, 29 Feb 2012 03:26:25 +0000 (16:26 +1300)] 
Update keystone program to run with new nichrome bits

Will also work with old nichrome bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoInclude strings.h for strcasecmp
Jeremy Huddleston [Fri, 11 Nov 2011 19:34:38 +0000 (11:34 -0800)] 
Include strings.h for strcasecmp

Our minimum requirement for X11 is currently Unix98.  Unix98 provides
strcasecmp in <strings.h>.  This commit fixes implicit declarations
of this function on systems that closely adhere to the standard.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoxrandr: Preserve current mode when switching crtcs
Keith Packard [Sun, 7 Aug 2011 02:06:42 +0000 (19:06 -0700)] 
xrandr: Preserve current mode when switching crtcs

When switching output crtcs, preserve any current mode in preference
to selecting whatever mode is currently in use on that crtc.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoDocument the rarer --newmode flags in --help output
Adam Jackson [Wed, 20 Jul 2011 18:34:19 +0000 (14:34 -0400)] 
Document the rarer --newmode flags in --help output

Signed-off-by: Adam Jackson <ajax@redhat.com>
12 years agoxrandr 1.3.5 xrandr-1.3.5
Alan Coopersmith [Thu, 30 Jun 2011 04:18:23 +0000 (21:18 -0700)] 
xrandr 1.3.5

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agofind_mode: Search for the mode closes to the specified rate
Jeremy Huddleston [Mon, 9 May 2011 16:26:34 +0000 (09:26 -0700)] 
find_mode: Search for the mode closes to the specified rate

This was the intention of d9aeb4a7544ad4a33f6f54bc46bff5cdf231a986, but
find_mode was still picking the first string match rather than the
match with the closest refresh rate.

xrandr.c:740:3: warning: Value stored to 'bestDist' is never read
               bestDist = dist;
               ^          ~~~~

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoDead code removal
Jeremy Huddleston [Sun, 8 May 2011 23:42:50 +0000 (16:42 -0700)] 
Dead code removal

xrandr.c:2978:33: warning: Value stored to 'first' is never read
                    if (!first) printf (" "); first = False;
                                              ^       ~~~~~
xrandr.c:2966:30: warning: Value stored to 'first' is never read
                        if (!first) printf (" "); first = False;
                                                  ^       ~~~~~

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoDead code removal
Jeremy Huddleston [Sun, 8 May 2011 23:35:47 +0000 (16:35 -0700)] 
Dead code removal

Removing the redundant setting of format = 32 in the XA_ATOM case.
It was already set to that earlier whe it was assigned actual_format.

xrandr.c:2770:3: warning: Value stored to 'format' is never read
                format=0;
                ^      ~
xrandr.c:2782:7: warning: Value stored to 'format' is never read
                    format = actual_format;
                    ^        ~~~~~~~~~~~~~

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoMark usage, fatal, and panic as _X_NORETURN
Jeremy Huddleston [Sun, 8 May 2011 23:29:51 +0000 (16:29 -0700)] 
Mark usage, fatal, and panic as _X_NORETURN

xrandr.c:634:13: warning: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'output')
    output->next = NULL;
    ~~~~~~  ^
xrandr.c:1214:6: warning: Access to field 'mode' results in a dereference of a null pointer (loaded from variable 'crtc_info')
        if (crtc_info->mode == None)
            ^~~~~~~~~
xrandr.c:1252:5: warning: Array access (via field 'outputs') results in a null pointer dereference
    crtc->outputs[crtc->noutput++] = output;
    ^     ~~~~~~~
xrandr.c:1638:33: warning: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'output_info')
        set_name_string (&output_name, output_info->name);
                                       ^~~~~~~~~~~
xrandr.c:1725:10: warning: Access to field 'changes' results in a dereference of a null pointer (loaded from variable 'output')
            if (output->changes)
                ^~~~~~
xrandr.c:1848:10: warning: Access to field 'mode_info' results in a dereference of a null pointer (loaded from variable 'relation')
            if (relation->mode_info == NULL)
                ^~~~~~~~
xrandr.c:3194:11: warning: Array access (from variable 'mode_shown') results in a null pointer dereference
                    if (mode_shown[j]) continue;
                        ^~~~~~~~~~

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoconfig: move man pages into their own directory
Gaetan Nadon [Wed, 19 Jan 2011 15:06:56 +0000 (10:06 -0500)] 
config: move man pages into their own directory

Use services provided by XORG_MANPAGE_SECTIONS.
Use standard Makefile for man pages.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
13 years agoman: replace hard coded man page section with substitution strings
Gaetan Nadon [Thu, 13 Jan 2011 22:15:36 +0000 (17:15 -0500)] 
man: replace hard coded man page section with substitution strings

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
13 years agoman: remove trailing spaces and tabs
Gaetan Nadon [Thu, 13 Jan 2011 16:15:48 +0000 (11:15 -0500)] 
man: remove trailing spaces and tabs

Using s/[ \t]*$//

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
13 years agoconfig: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
Gaetan Nadon [Wed, 12 Jan 2011 21:28:02 +0000 (16:28 -0500)] 
config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS

This silences an Autoconf warning

13 years agoAdd --current to usage.
Matthias Hopf [Mon, 10 Jan 2011 16:56:16 +0000 (17:56 +0100)] 
Add --current to usage.

13 years agoxrandr 1.3.4 xrandr-1.3.4
Alan Coopersmith [Sat, 30 Oct 2010 18:28:41 +0000 (11:28 -0700)] 
xrandr 1.3.4

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoconfig: Remove unnecessary calls from configure.ac
Alan Coopersmith [Sat, 30 Oct 2010 18:26:40 +0000 (11:26 -0700)] 
config: Remove unnecessary calls from configure.ac

AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoconfig: upgrade to util-macros 1.8 for additional man page support
Alan Coopersmith [Sat, 30 Oct 2010 18:25:53 +0000 (11:25 -0700)] 
config: upgrade to util-macros 1.8 for additional man page support

Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
The value of MAN_SUBST is the same for all X.Org packages.

Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
The existing statement can now be removed from the configuration file.

Use automake provided $(AM_V_GEN) and XORG_DEFAULT_OPTIONS provided $(SED)
Enables silent rule and use platform appropriate version of sed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoconfig: update AC_PREREQ statement to 2.60
Gaetan Nadon [Sat, 30 Oct 2010 18:24:14 +0000 (11:24 -0700)] 
config: update AC_PREREQ statement to 2.60

Unrelated to the previous patches, the new value simply reflects
the reality that the minimum level for autoconf to configure
all x.org modules is 2.60 dated June 2006.

ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoCall QueryExtension before any other RandR function (bug#30806)
Julien Cristau [Tue, 12 Oct 2010 19:20:18 +0000 (21:20 +0200)] 
Call QueryExtension before any other RandR function (bug#30806)

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
13 years agoBug 29348 - dot clock parameter missing from --newmode in man page
Alan Coopersmith [Thu, 23 Sep 2010 02:39:27 +0000 (19:39 -0700)] 
Bug 29348 - dot clock parameter missing from --newmode in man page

https://bugs.freedesktop.org/show_bug.cgi?id=29348

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
13 years agoBump to 1.3.3 xrandr-1.3.3
Julien Cristau [Mon, 19 Jul 2010 17:07:56 +0000 (18:07 +0100)] 
Bump to 1.3.3

13 years agoRequire xorg-macros 1.4 for XORG_INSTALL
Julien Cristau [Mon, 19 Jul 2010 17:06:56 +0000 (18:06 +0100)] 
Require xorg-macros 1.4 for XORG_INSTALL

13 years agoKill cvs keyword
Julien Cristau [Mon, 19 Jul 2010 17:05:37 +0000 (18:05 +0100)] 
Kill cvs keyword

14 years agoxrandr: get gamma and brightness
Eric Piel [Sat, 9 Jan 2010 23:08:53 +0000 (00:08 +0100)] 
xrandr: get gamma and brightness

Even in verbose query mode, gamma and brigthness were not displayed.
That's because they are not stored in the server the same way they are
specified on the command line: they are stored as 256 * 3 u16 while
the command line is 3 + 1 floats.  Still, this is useful info for the
users, and they don't care about how it's stored in the server.

So we do a regression over the values stored to recover info in the same
way as on the command line: gamma and brightness.

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-By: Matthias Hopf <mhopf@suse.de>
14 years agoxrandr: fix maximum gamma set
Eric Piel [Sat, 9 Jan 2010 23:08:53 +0000 (00:08 +0100)] 
xrandr: fix maximum gamma set

Gamma is an array of 3 16-bit values. Currently, the maximum value assigned is
255*256, which is only 65280. Make sure that when we set the gamma, the maximum
value is 65535. It's slightly brighter but also helps to avoid kludges to
detect clamped values when reading back the gamma.

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Matthias Hopf <mhopf@suse.de>
14 years agoconfig: move CWARNFLAGS from configure.ac to Makefile.am
Gaetan Nadon [Thu, 11 Feb 2010 15:08:07 +0000 (10:08 -0500)] 
config: move CWARNFLAGS from configure.ac to Makefile.am

Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
14 years agoxrandr: fix brightness to prevent gamma to overflow and to allow 0
Éric Piel [Wed, 6 Jan 2010 13:42:15 +0000 (14:42 +0100)] 
xrandr: fix brightness to prevent gamma to overflow and to allow 0

With the new brightness option, gamma would overflow with values > 1,
leading to rainbow looking screen.

In addition, have the brightness by default to 1, so that specifying 0
actually does the expected behaviour of leading to a black screen.

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Matthias Hopf <mhopf@suse.de>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
14 years agoxrandr: Remove --clone / --extend support code
Yann Droneaud [Tue, 17 Nov 2009 14:39:02 +0000 (15:39 +0100)] 
xrandr: Remove --clone / --extend support code

Code handling --clone and --extend is not used.
The usage message regarding those options was already commented out.

Signed-off-by: Yann Droneaud <ydroneaud@mandriva.com>
Acked-by: Matthias Hopf <mhopf@suse.de>
14 years agoLanguage fixes.
Matthias Hopf [Tue, 5 Jan 2010 13:58:42 +0000 (14:58 +0100)] 
Language fixes.

14 years agoxrandr: Use a prefix for enum type _policy and _relation like other enums in xrandr.c
Yann Droneaud [Tue, 17 Nov 2009 14:39:01 +0000 (15:39 +0100)] 
xrandr: Use a prefix for enum type _policy and _relation like other enums in xrandr.c

Try to apply the same coding style to enum _policy and enum _relation.

This patch also workarounds bug #12958 .

Signed-off-by: Yann Droneaud <ydroneaud@mandriva.com>
Acked-by: Matthias Hopf <mhopf@suse.de>
14 years agoAdd --brightness for CRTC
Mikhail Gusarov [Sat, 24 Oct 2009 21:41:05 +0000 (03:41 +0600)] 
Add --brightness for CRTC

--brightness n.m adjusts gamma set for CRTC in order to compensate
for overly bright or overly dark unmanageable outputs.

Signed-off-by: Matthias Hopf <mhopf@suse.de>
14 years agoxrandr: add more information about the transform option in the manpage
Matthias Hopf [Sat, 2 Jan 2010 23:40:19 +0000 (00:40 +0100)] 
xrandr: add more information about the transform option in the manpage

Add information about the transformation, stating it's a homogeneous
coordinate transformation and adding the (simplified) pixel calculation
formula. Also and an example of keystone shaping generated using the algorithm
found in xkeystone.

Based on a patch by Eric Piel <eric.piel@tremplin-utc.net>

Signed-off-by: Matthias Hopf <mhopf@suse.de>
14 years agoxrandr: check_strtod should return double, not int
Dominik Jasiok [Tue, 22 Dec 2009 18:48:04 +0000 (10:48 -0800)] 
xrandr: check_strtod should return double, not int

check_strtod performs error checking around strtod to ensure that
arguments are correctly processed. However, it also accidentally(?)
cast the result to int, which was then universally cast back to double
by all callers. Narrowing and re-widening the type doesn't make any sense.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 years agoMakefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
Gaetan Nadon [Thu, 26 Nov 2009 14:19:54 +0000 (09:19 -0500)] 
Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES

Now that the INSTALL file is generated.
Allows running make maintainer-clean.

14 years agoINSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Gaetan Nadon [Wed, 28 Oct 2009 18:09:08 +0000 (14:09 -0400)] 
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206

Add missing INSTALL file. Use standard GNU file on building tarball
README may have been updated
Remove AUTHORS file as it is empty and no content available yet.
Remove NEWS file as it is empty and no content available yet.

14 years agoDeploy the new XORG_DEFAULT_OPTIONS #24242
Gaetan Nadon [Tue, 27 Oct 2009 19:07:25 +0000 (15:07 -0400)] 
Deploy the new XORG_DEFAULT_OPTIONS #24242

This macro aggregate a number of existing macros that sets commmon
X.Org components configuration options. It shields the configuration file from
future changes.

14 years agoMakefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
Gaetan Nadon [Tue, 27 Oct 2009 02:08:39 +0000 (22:08 -0400)] 
Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432

ChangeLog filename is known to Automake and requires no further
coding in the makefile.

14 years ago.gitignore: use common defaults with custom section # 24239
Gaetan Nadon [Thu, 22 Oct 2009 16:34:16 +0000 (12:34 -0400)] 
.gitignore: use common defaults with custom section # 24239

Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.

14 years agoxrandr: Remove test against RANDR_MAJOR/RANDR_MINOR
Yann Droneaud [Tue, 17 Nov 2009 09:34:41 +0000 (10:34 +0100)] 
xrandr: Remove test against RANDR_MAJOR/RANDR_MINOR

xrandr.c uses structures defined in <X11/extensions/Xrandr.h>
provided by 'libXrandr' package but tests structures availability
through RANDR_MAJOR/RANDR_MINOR defined in <X11/extensions/randr.h>
provided by 'randrproto' package.

Sometimes they are not in sync so it's safer to rely on checks made
by configure script through pkg-config.

In my test case, XRRPanning structure is not defined in Xrandr.h,
RANDR_MAJOR is 1 and RANDR_MINOR 2 but xrandr.c try to use it anyway.
(for the record, XRRPanning was added in libXrandr-1.2.91).

Signed-off-by: Yann Droneaud <ydroneaud@mandriva.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
14 years agoxrandr: do not segfault when "--scale" or "--transform" have no output
Éric Piel [Mon, 26 Oct 2009 13:11:02 +0000 (14:11 +0100)] 
xrandr: do not segfault when "--scale" or "--transform" have no output

"xrandr --scale 2x2" segfaults, because the --scale (and --transform)
options do not check for an existing output.

Make sure there is an output specified (like every other options).

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Matthias Hopf <mhopf@suse.de>
14 years agoxrandr: make --query really the default option
Éric Piel [Mon, 26 Oct 2009 12:57:10 +0000 (13:57 +0100)] 
xrandr: make --query really the default option

The manpage states that "--query" is the default action when nothing
specific is requested. However, some options such as "-display" or
"--screen" lead to do nothing by default. This makes sure that unless
something specific is requested, query is done.

This also restores the behaviour of --q1 to the same one as the old
xrandr: also display the info on rotation and reflection by default.

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Matthias Hopf <mhopf@suse.de>
14 years agoThis is not a GNU project, so declare it foreign.
Jeremy Huddleston [Wed, 21 Oct 2009 19:47:21 +0000 (12:47 -0700)] 
This is not a GNU project, so declare it foreign.

On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
> On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
> > I noticed an INSTALL file in xlsclients and libXvMC today, and it
> > was quite annoying to work around since 'autoreconf -fvi' replaces
> > it and git wants to commit it.  Should these files even be in git?
> > Can I nuke them for the betterment of humanity and since they get
> > created by autoreconf anyways?
>
> See https://bugs.freedesktop.org/show_bug.cgi?id=24206

As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
of the INSTALL file. It is also part of the 24206 solution.

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
14 years agoAdd README with pointers to mailing lists, bugzilla, & git
Alan Coopersmith [Thu, 1 Oct 2009 21:54:29 +0000 (14:54 -0700)] 
Add README with pointers to mailing lists, bugzilla, & git

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
14 years agoBump to 1.3.2 xrandr-1.3.2
Matthias Hopf [Thu, 10 Sep 2009 11:18:35 +0000 (13:18 +0200)] 
Bump to 1.3.2

14 years agoAdd missing 'static's to get rid of warnings.
Matthias Hopf [Thu, 10 Sep 2009 11:17:56 +0000 (13:17 +0200)] 
Add missing 'static's to get rid of warnings.

14 years agochanged a bunch of string to number conversions for reliability
Bart Massey [Thu, 7 Feb 2008 22:03:24 +0000 (14:03 -0800)] 
changed a bunch of string to number conversions for reliability

14 years agoWarn if one of the outputs given did not exist
Bart Massey [Fri, 4 Sep 2009 13:36:51 +0000 (15:36 +0200)] 
Warn if one of the outputs given did not exist

14 years agoBump to 1.3.1 xrandr-1.3.1
Matthias Hopf [Tue, 11 Aug 2009 14:11:39 +0000 (16:11 +0200)] 
Bump to 1.3.1

Also finally bump xrandr requirement to 1.3

14 years agobfo#22864 - grab the server around all modifications to CRTCs
Federico Mena Quintero [Mon, 20 Jul 2009 21:44:52 +0000 (16:44 -0500)] 
bfo#22864 - grab the server around all modifications to CRTCs

We were not grabbed while disabling the CRTCs that should be off, so other clients could think
that there was an intermediate stage with no enabled outputs.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
14 years agoxrandr: Document --nograb option
Éric Piel [Tue, 14 Jul 2009 19:36:32 +0000 (21:36 +0200)] 
xrandr: Document --nograb option

Op 08-07-09 15:19, Matthias Hopf schreef:
> On Jul 07, 09 22:02:51 +0200, Éric Piel wrote:
>> Op 21-05-09 13:23, Éric Piel schreef:
>>> This documents the --nograb option with whichever I could understand of
>>> the advantages and drawbacks of grabbing the screen.
>>>
>>> Also fixes the formatting in the xrandr 1.3 options.
>> Please review and apply.
>
> Please resend as attachment.
>
Please find attached the git patch.

Thanks,
Eric

>From 34e7c1036ba0e0d7827563deaffea9371031fa0b Mon Sep 17 00:00:00 2001
From: Eric Piel <eric.piel@tremplin-utc.net>
Date: Thu, 21 May 2009 13:01:52 +0200
Subject: [PATCH] xrandr: Document --nograb option

This documents the --nograb option with whichever I could understand of
the advantages and drawback of grabbing the screen.

Also fixes the formatting in the xrandr 1.3 options