xrandr: Changes to 'master'

Aaron Plattner aplattner at kemper.freedesktop.org
Tue Feb 12 14:34:18 PST 2013


 configure.ac   |    4 
 man/xrandr.man |    4 
 xrandr.c       |  683 +++++++++++++++++++++++++++++----------------------------
 3 files changed, 362 insertions(+), 329 deletions(-)

New commits:
commit 222f245fb3a00308cb3ff491f5c84ac9c69c3253
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Tue Feb 12 13:24:38 2013 -0800

    xrandr 1.4.0
    
    Signed-off-by: Aaron Plattner <aplattner at nvidia.com>

commit 3e5f160c4198a5160be5e9a3f21ba3f4130d4318
Merge: dac72db bd16618
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Tue Feb 12 12:30:20 2013 -0800

    Merge branch 'fixes'
    
    Conflicts:
    	xrandr.c

commit bd166184f6c1973ae2f5f99d040733db3e9e82cf
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Wed Feb 6 14:21:57 2013 -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 at nvidia.com>
    Reviewed-by: Daniel Dadap <ddadap at nvidia.com>

commit 7fd4f18b649f22fad4dbf9fc64b69b3e7f172207
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Wed Feb 6 11:13:06 2013 -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 at nvidia.com>
    Reviewed-by: Daniel Dadap <ddadap at nvidia.com>

commit d752d524027fbc20d9fdee06fed173e454f15370
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Wed Feb 6 10:10:03 2013 -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 at nvidia.com>
    Reviewed-by: Daniel Dadap <ddadap at nvidia.com>

commit b2f0bd198b1116e45389a6628b657b722b4102a4
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Wed Feb 6 14:11:23 2013 -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 at nvidia.com>
    Reviewed-by: Daniel Dadap <ddadap at nvidia.com>

commit 0a26e076e10a3c7461d59c830cdc10688d66824f
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Wed Feb 6 13:08:58 2013 -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 at nvidia.com>
    Reviewed-by: Daniel Dadap <ddadap at nvidia.com>

commit dac72dbbc7501483eccec71bbf0db05a56756109
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Fri Aug 24 21:43:13 2012 -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 at nvidia.com>
    Reviewed-by: Andy Ritger <aritger at nvidia.com>



More information about the xorg-commit mailing list