Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37745873
en ru br
ALT Linux repos
S:1.5.1-alt1
5.0: 1.3.0-alt1
4.1: 1.2.3-alt1
4.0: 1.2.0-alt3

Group :: System/X11
RPM: xrandr

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: xrandr-1.5.0-alt2.patch
Download


 .gear/rules                                        |   2 +
 .../tags/2dedb73a0e257a8703931fb790f018473b7f5e9b  |  23 +++++
 .gear/tags/list                                    |   1 +
 Makefile.am                                        |   4 +-
 README                                             |  26 -----
 README.md                                          |  18 ++++
 autogen.sh                                         |  11 +-
 configure.ac                                       |   2 +-
 man/xrandr.man                                     |  77 +++++++++++---
 xrandr.c                                           |  89 +++++++++++++++--
 xrandr.spec                                        | 111 +++++++++++++++++++++
 11 files changed, 304 insertions(+), 60 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..f78a96e
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: @name@-@version@:.
+diff: @name@-@version@:. .
diff --git a/.gear/tags/2dedb73a0e257a8703931fb790f018473b7f5e9b b/.gear/tags/2dedb73a0e257a8703931fb790f018473b7f5e9b
new file mode 100644
index 0000000..6094d0b
--- /dev/null
+++ b/.gear/tags/2dedb73a0e257a8703931fb790f018473b7f5e9b
@@ -0,0 +1,23 @@
+object 65fd628cdfd1c95bd01a50706d4577655d1dd404
+type commit
+tag xrandr-1.5.0
+tagger Aaron Plattner <aplattner@nvidia.com> 1456251989 -0800
+
+xrandr-1.5.0
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iQIcBAABCAAGBQJWzKRVAAoJEBvvPYQBpohhYxkQAJx3yGF0GxDqzhDTYVP0sSWB
+Ov1g6ZqbvleMlXAtOfcd9qhADSVebTAKsbip8pzGaS+Trq6qmGTEhfdaDghRuRd7
+cDJWBOGEa0cmUyxaLo1YezoWRxokc/n7lG8qX8/sRcHMO4Lq5A7NoZuiPZTpjS+X
+sUgp2lkUHtNI+ieZK6pNSUhPssQspW2BCSco3WpLAq1sj6UN3lsr867LydqbcTrW
+IxQi0GyXy+2nxbX96vaA207oUGIbTwZZEZDZy/ppRUcCc2xrZj7SmwTaEqhqsrV5
+25uzt185ee0fLiOBnetbd82XimySR+Z3pRSwzYI8rre3qikmAlAWyukY5xZeT2aP
+FZWGLhHxNL3WgDqgTu+WVqcN+lPnpIEnkR/oB2oNtZoxUWfzi9O0qeH7w3JhxLKK
+q280O6ExMldBOM+Et57xhAMzZiB2XBeQAyK4arg5rEg8zS4kRPpkjiORAlwlRz+u
+/9B/pXoIGPHuyMeu3oS/RDL/JT6OtFJyj5c1tlW3dd2xStWP5jCCQbt34WW8zr49
+yDeJ5vDrbcLA1X7MyvUrqGhL8fGy3CJjua1AdnM+WJrQJV2xoiouPOLiBLyaWrez
+CWEREvshyEQmcJcL7KC49Lvg7ZW6tX1XVNgepLgA5djGVE9Iq7dAI2rTKtBdugYj
+2/Cdjl5FH7wLJLk//Z5I
+=oC9o
+-----END PGP SIGNATURE-----
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..4d6c6eb
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+2dedb73a0e257a8703931fb790f018473b7f5e9b xrandr-1.5.0
diff --git a/Makefile.am b/Makefile.am
index 4f1c5e7..0e9f74f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,8 +22,6 @@
 SUBDIRS = man
 bin_PROGRAMS = xrandr
 
-bin_SCRIPTS = xkeystone
-
 xkeystone: keystone.5c
 	(echo '#!/usr/bin/env nickle'; cat ${srcdir}/keystone.5c) > $@
 	chmod +x $@
@@ -37,7 +35,7 @@ xrandr_LDADD = $(XRANDR_LIBS)
 xrandr_SOURCES =	\
         xrandr.c
 
-EXTRA_DIST = xrandr_test.pl keystone.5c
+EXTRA_DIST = xrandr_test.pl keystone.5c README.md
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
 .PHONY: ChangeLog INSTALL
diff --git a/README b/README
deleted file mode 100644
index f7d88f9..0000000
--- a/README
+++ /dev/null
@@ -1,26 +0,0 @@
-xrandr - primitive command line interface to X11 Resize, Rotate, and Reflect
-(RandR) extension
-
-All questions regarding this software should be directed at the
-Xorg mailing list:
-
-        http://lists.freedesktop.org/mailman/listinfo/xorg
-
-Please submit bug reports to the Xorg bugzilla:
-
-        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
-The master development code repository can be found at:
-
-        git://anongit.freedesktop.org/git/xorg/app/xrandr
-
-        http://cgit.freedesktop.org/xorg/app/xrandr
-
-For patch submission instructions, see:
-
-	http://www.x.org/wiki/Development/Documentation/SubmittingPatches
-
-For more information on the git code manager, see:
-
-        http://wiki.x.org/wiki/GitPage
-
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ba56211
--- /dev/null
+++ b/README.md
@@ -0,0 +1,18 @@
+xrandr - primitive command line interface to X11 Resize, Rotate, and Reflect
+(RandR) extension
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+  https://lists.x.org/mailman/listinfo/xorg
+
+The master development code repository can be found at:
+
+  https://gitlab.freedesktop.org/xorg/app/xrandr
+
+Please submit bug reports and requests to merge patches there.
+
+For patch submission instructions, see:
+
+  https://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
diff --git a/autogen.sh b/autogen.sh
index fc34bd5..06d4c25 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,14 +1,17 @@
 #! /bin/sh
 
-srcdir=`dirname $0`
+srcdir=`dirname "$0"`
 test -z "$srcdir" && srcdir=.
 
 ORIGDIR=`pwd`
-cd $srcdir
+cd "$srcdir"
 
 autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+    git config --local format.subjectPrefix "PATCH app/xrandr"
 
 if test -z "$NOCONFIGURE"; then
-    $srcdir/configure "$@"
+    exec "$srcdir"/configure "$@"
 fi
diff --git a/configure.ac b/configure.ac
index dcf7c10..cfa5c41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure.
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xrandr], [1.5.0],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xrandr])
+        [https://gitlab.freedesktop.org/xorg/app/xrandr/issues], [xrandr])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
 
diff --git a/man/xrandr.man b/man/xrandr.man
index 73d337c..1291bad 100644
--- a/man/xrandr.man
+++ b/man/xrandr.man
@@ -34,7 +34,7 @@ xrandr \- primitive command line interface to RandR extension
 [\-\-current]
 [\-\-noprimary]
 [\-\-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]
+[\-\-scale \fIx\fP[x\fIy\fP]]
 [\-\-scale-from \fIw\fPx\fIh\fP]
 [\-\-transform \fIa\fP,\fIb\fP,\fIc\fP,\fId\fP,\fIe\fP,\fIf\fP,\fIg\fP,\fIh\fP,\fIi\fP]
 [\-\-primary]
@@ -42,6 +42,7 @@ xrandr \- primitive command line interface to RandR extension
 [\-\-fb \fIwidth\fPx\fIheight\fP]
 [\-\-fbmm \fIwidth\fPx\fIheight\fP]
 [\-\-dpi \fIdpi\fP]
+[\-\-dpi \fIfrom-output\fP]
 [\-\-newmode \fIname\fP \fImode\fP]
 [\-\-rmmode \fIname\fP]
 [\-\-addmode \fIoutput\fP \fIname\fP]
@@ -62,7 +63,7 @@ xrandr \- primitive command line interface to RandR extension
 [\-\-set \fIproperty\fP \fIvalue\fP]
 [\-\-off]
 [\-\-crtc \fIcrtc\fP]
-[\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP]
+[\-\-gamma \fIred\fP[:\fIgreen\fP:\fIblue\fP]]
 [\-\-brightness \fIbrightness\fP]
 [\-o \fIorientation\fP]
 [\-s \fIsize\fP]
@@ -71,6 +72,10 @@ xrandr \- primitive command line interface to RandR extension
 [\-\-listproviders]
 [\-\-setprovideroutputsource \fIprovider\fP \fIsource\fP]
 [\-\-setprovideroffloadsink \fIprovider\fP \fIsink\fP]
+[\-\-listmonitors]
+[\-\-listactivemonitors]
+[\-\-setmonitor \fIname\fP \fIgeometry\fP \fIoutputs\fP]
+[\-\-delmonitor \fIname\fP]
 .SH DESCRIPTION
 .I Xrandr
 is used to set the size, orientation and/or reflection of the outputs for a
@@ -117,6 +122,25 @@ is available.
 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.5 options"
+.PP
+Options for RandR 1.5 are used as a superset of the options for RandR 1.4.
+.PP
+.IP \-\-listmonitors
+Report information about all defined monitors.
+.IP \-\-listactivemonitors
+Report information about currently active monitors.
+.IP "\-\-setmonitor \fIname\fP \fIgeometry\fP \fIoutputs\fP"} {none|\fIoutput\fP,\fIoutput\fP,...}\n"
+Define a new monitor with the given geometry and associated to the given outputs.
+The output list is either the keyword \fBnone\fP or a comma-separated list of outputs.
+The geometry is either the keyword \fBauto\fP, in which case the monitor
+will automatically track the geometry of the associated outputs, or a manual specification
+in the form
+\fIw\fP/\fImmw\fPx\fIh\fP/\fImmh\fP+\fIx\fP+\fIy\fP
+where w, h, x, y are in pixels and mmw, mmh are the physical dimensions of the monitor.
+.IP "\-\-delmonitor \fIname\fP"
+Delete the given user-defined monitor.
+.PP
 .SH "RandR version 1.4 options"
 .PP
 Options for RandR 1.4 are used as a superset of the options for RandR 1.3.
@@ -154,7 +178,9 @@ 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.
+Specifies a transformation matrix to apply on the output.
+A bilinear filter is selected automatically unless the \-\-filter parameter is
+also specified.
 The mathematical form corresponds to:
 .RS
 .RS
@@ -200,11 +226,17 @@ 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).
 .RE
-.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 "\-\-filter \fIfiltermode\fP"
+Chooses the scaling filter method to be applied when the screen is scaled or
+transformed.
+Can be either 'bilinear' or 'nearest'.
+.IP "\-\-scale \fIx\fP[x\fIy\fP]"
+Changes the dimensions of the output picture.
+If the \fIy\fP value is omitted, the \fIx\fP value will be used for both dimensions.
+Values larger than 1 lead to a compressed screen (screen dimension bigger
+than the dimension of the output mode), and values less than 1 lead to
+a zoom in on the output.
+This option is actually a shortcut version of the \fI\-\-transform\fP option.
 .IP "\-\-scale-from \fIw\fPx\fIh\fP"
 Specifies the size in pixels of the area of the framebuffer to be displayed on
 this output.
@@ -225,13 +257,25 @@ 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 \fIwidth\fPx\fIheight\fP"
-Sets the reported values for the physical size of the screen. Normally,
+Sets the value reported as physical size of the X screen as a whole
+(union of all configured monitors). In configurations with multiple
+monitors with different DPIs, the value has no physical meaning, but
+it may be used by some legacy clients which do not support RandR
+version 1.2 to compute a reference font scaling. Normally,
 xrandr resets the reported physical size values to keep the DPI constant.
-This overrides that computation.
+This overrides that computation. Default DPI value is 96.
 .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 "\-\-dpi \fIfrom-output\fP"
+This also sets the value reported as physical size of the X screen as a whole
+(union of all configured monitors). In configurations with multiple
+monitors with different DPIs, the value has no physical meaning, but
+it may be used by some legacy clients which do not support RandR
+version 1.2 to compute a reference font scaling. This option uses either
+the specified DPI value, or the DPI of the given output, to compute an appropriate
+physical size using whatever pixel size will be set. Typical values are
+the default (96 DPI), the DPI of the only monitor in single-monitor
+configurations, or the DPI of the primary monitor in multi-monitor
+configurations.
 .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
@@ -293,9 +337,12 @@ 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 "\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP"
+.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
+currently attached to this output.
+If green and blue are not specified, the red value will be used
+for all three components.
+Note that you cannot get two different values
 for cloned outputs (i.e.: which share the same crtc) and that switching an output to another crtc doesn't change
 the crtc gamma corrections at all.
 .IP "\-\-brightness \fIbrightness\fP"
diff --git a/xrandr.c b/xrandr.c
index dcfdde0..0eff3c1 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -54,6 +54,11 @@ static Bool	automatic = False;
 static Bool	properties = False;
 static Bool	grab_server = True;
 static Bool	no_primary = False;
+static int	filter_type = -1;
+
+static const char *filter_names[2] = {
+    "bilinear",
+    "nearest"};
 
 static const char *direction[5] = {
     "normal", 
@@ -132,13 +137,14 @@ usage(void)
            "      --below <output>\n"
            "      --same-as <output>\n"
            "      --set <property> <value>\n"
-           "      --scale <x>x<y>\n"
+           "      --scale <x>[x<y>]\n"
            "      --scale-from <w>x<h>\n"
            "      --transform <a>,<b>,<c>,<d>,<e>,<f>,<g>,<h>,<i>\n"
+           "      --filter nearest,bilinear\n"
            "      --off\n"
            "      --crtc <crtc>\n"
            "      --panning <w>x<h>[+<x>+<y>[/<track:w>x<h>+<x>+<y>[/<border:l>/<t>/<r>/<b>]]]\n"
-           "      --gamma <r>:<g>:<b>\n"
+           "      --gamma <r>[:<g>:<b>]\n"
            "      --brightness <value>\n"
            "      --primary\n"
            "  --noprimary\n"
@@ -285,6 +291,7 @@ typedef enum _changes {
     changes_panning = (1 << 10),
     changes_gamma = (1 << 11),
     changes_primary = (1 << 12),
+    changes_filter = (1 << 13),
 } changes_t;
 
 typedef enum _name_kind {
@@ -630,6 +637,7 @@ print_verbose_mode (const XRRModeInfo *mode, Bool current, Bool preferred)
 static void
 init_name (name_t *name)
 {
+    memset(name, 0, sizeof(*name));
     name->kind = name_none;
 }
 
@@ -1311,6 +1319,10 @@ set_output_info (output_t *output, RROutput xid, XRROutputInfo *output_info)
 	    output->transform.params = NULL;
 	}
     }
+    if (output->changes & changes_filter)
+    {
+	output->transform.filter = filter_names[filter_type];
+    }
 
     /* set primary */
     if (!(output->changes & changes_primary))
@@ -1811,6 +1823,7 @@ get_outputs (void)
 	output_t	*output;
 	name_t		output_name;
 	if (!output_info) fatal ("could not get output 0x%lx information\n", res->outputs[o]);
+	init_name(&output_name);
 	set_name_xid (&output_name, res->outputs[o]);
 	set_name_index (&output_name, o);
 	set_name_string (&output_name, output_info->name);
@@ -2808,6 +2821,28 @@ main (int argc, char **argv)
 	    action_requested = True;
 	    continue;
 	}
+	if (!strcmp("--filter", argv[i])) {
+	    int t;
+
+	    if (!config_output) argerr ("%s must be used after --output\n", argv[i]);
+	    if (++i >= argc) argerr("%s requires an argument\n", argv[i-1]);
+
+	    filter_type = -1;
+	    for (t = 0; t < sizeof(filter_names) / sizeof(filter_names[0]); t++)
+	    {
+		if (!strcmp(filter_names[t], argv[i]))
+		{
+		    filter_type = t;
+		    break;
+		}
+	    }
+
+	    if (filter_type == -1) argerr("Bad argument: %s, for a filter\n", argv[i]);
+
+	    config_output->changes |= changes_filter;
+	    action_requested = True;
+	    continue;
+	}
 	if (!strcmp ("--crtc", argv[i])) {
 	    if (!config_output) argerr ("%s must be used after --output\n", argv[i]);
 	    if (++i >= argc) argerr ("%s requires an argument\n", argv[i-1]);
@@ -2934,11 +2969,21 @@ main (int argc, char **argv)
 	    continue;
 	}
 	if (!strcmp ("--gamma", argv[i])) {
+	    char junk;
 	    if (!config_output) argerr ("%s must be used after --output\n", argv[i]);
 	    if (++i >= argc) argerr ("%s requires an argument\n", argv[i-1]);
-	    if (sscanf(argv[i], "%f:%f:%f", &config_output->gamma.red,
-		    &config_output->gamma.green, &config_output->gamma.blue) != 3)
-		argerr ("%s: invalid argument '%s'\n", argv[i-1], argv[i]);
+	    if (sscanf(argv[i], "%f:%f:%f%c", &config_output->gamma.red,
+		    &config_output->gamma.green, &config_output->gamma.blue, &junk) != 3)
+	    {
+		/* check if it's a single floating-point value,
+		 * to be applied to all components */
+		if (sscanf(argv[i], "%f%c", &config_output->gamma.red, &junk) != 1)
+		    argerr ("%s: invalid argument '%s'\n", argv[i-1], argv[i]);
+		config_output->gamma.green = config_output->gamma.blue = config_output->gamma.red;
+	    }
+	    if (config_output->gamma.red <= 0.0 || config_output->gamma.green <= 0.0 ||
+		    config_output->gamma.blue <= 0.0)
+		    argerr ("gamma correction factors must be positive\n");
 	    config_output->changes |= changes_gamma;
 	    setit_1_2 = True;
 	    continue;
@@ -2981,10 +3026,17 @@ main (int argc, char **argv)
 	if (!strcmp ("--scale", argv[i]))
 	{
 	    double  sx, sy;
+	    char junk;
 	    if (!config_output) argerr ("%s must be used after --output\n", argv[i]);
 	    if (++i >= argc) argerr ("%s requires an argument\n", argv[i-1]);
-	    if (sscanf (argv[i], "%lfx%lf", &sx, &sy) != 2)
-		argerr ("failed to parse '%s' as a scaling factor\n", argv[i]);
+	    if (sscanf (argv[i], "%lfx%lf%c", &sx, &sy, &junk) != 2)
+	    {
+		if (sscanf (argv[i], "%lf%c", &sx, &junk) != 1)
+		    argerr ("failed to parse '%s' as a scaling factor\n", argv[i]);
+		sy = sx;
+	    }
+	    if (sx <= 0.0 || sy <= 0.0)
+		    argerr ("scaling factors must be positive\n");
 	    init_transform (&config_output->transform);
 	    config_output->transform.transform.matrix[0][0] = XDoubleToFixed (sx);
 	    config_output->transform.transform.matrix[1][1] = XDoubleToFixed (sy);
@@ -3703,14 +3755,16 @@ main (int argc, char **argv)
 		printf (" (");
 		for (i = 0; i < 4; i ++) {
 		    if ((rotations >> i) & 1) {
-			if (!first) printf (" "); first = False;
+			if (!first) printf (" ");
 			printf("%s", direction[i]);
+			first = False;
 		    }
 		}
 		if (rotations & RR_Reflect_X)
 		{
-		    if (!first) printf (" "); first = False;
+		    if (!first) printf (" ");
 		    printf ("x axis");
+		    first = False;
 		}
 		if (rotations & RR_Reflect_Y)
 		{
@@ -3873,6 +3927,12 @@ main (int argc, char **argv)
 		for (j = 0; j < output_info->nmode; j++)
 		{
 		    XRRModeInfo	*mode = find_mode_by_xid (output_info->modes[j]);
+		    if (!mode)
+		    {
+			printf ("  [Unknown mode ID 0x%x]\n",
+				(int)output_info->modes[j]);
+			continue;
+		    }
 
 		    print_verbose_mode (mode, mode == output->mode_info,
 					j < output_info->npreferred);
@@ -3887,16 +3947,23 @@ main (int argc, char **argv)
 		{
 		    XRRModeInfo *jmode, *kmode;
 		    int k;
-		    
+
 		    if (mode_shown[j]) continue;
-    
+
 		    jmode = find_mode_by_xid (output_info->modes[j]);
+		    if (!jmode)
+		    {
+			printf ("   [Unknown mode ID 0x%x]\n",
+				(int)output_info->modes[j]);
+			continue;
+		    }
 		    printf (" ");
 		    printf ("  %-12s", jmode->name);
 		    for (k = j; k < output_info->nmode; k++)
 		    {
 			if (mode_shown[k]) continue;
 			kmode = find_mode_by_xid (output_info->modes[k]);
+			if (!kmode) continue;
 			if (strcmp (jmode->name, kmode->name) != 0) continue;
 			mode_shown[k] = True;
 			kmode->modeFlags |= ModeShown;
diff --git a/xrandr.spec b/xrandr.spec
new file mode 100644
index 0000000..aa4d9cc
--- /dev/null
+++ b/xrandr.spec
@@ -0,0 +1,111 @@
+Name: xrandr
+Version: 1.5.0
+Release: alt2
+Summary: primitive command line interface to RandR extension
+License: MIT/X11
+Group: System/X11
+Url: https://gitlab.freedesktop.org/xorg/app/xrandr
+Packager: Valery Inozemtsev <shrek@altlinux.ru>
+
+Source: %name-%version.tar
+Patch: %name-%version-%release.patch
+
+BuildRequires: libXrandr-devel libXrender-devel xorg-util-macros
+
+%description
+Xrandr is used to set the screen size, orientation  and/or  reflection.
+The  -s  option is a small integer index used to specify which size the
+screen should be set to.  To find out what sizes are available, use the
+-q option, which reports the sizes available, the current rotation, and
+the possible rotations and reflections.  The default size is the  first
+size  specified in the list.  The -o option is used to specify the ori-
+entation of the screen, and can be one of "normal inverted left right 0
+1 2 3".
+
+%prep
+%setup -q
+%patch -p1
+
+%build
+%autoreconf
+%configure
+
+%make_build
+
+%install
+%make DESTDIR=%buildroot install
+
+%files
+%_bindir/*
+%_man1dir/*.1*
+
+%changelog
+* Wed Mar 20 2019 Fr. Br. George <george@altlinux.ru> 1.5.0-alt2
+- Merge with current git to support RandR 1.5
+
+* Mon Apr 18 2016 Valery Inozemtsev <shrek@altlinux.ru> 1.5.0-alt1
+- 1.5.0
+
+* Thu Mar 07 2013 Valery Inozemtsev <shrek@altlinux.ru> 1.4.0-alt1
+- 1.4.0
+
+* Thu Jun 30 2011 Valery Inozemtsev <shrek@altlinux.ru> 1.3.5-alt1
+- 1.3.5
+
+* Sat Oct 30 2010 Valery Inozemtsev <shrek@altlinux.ru> 1.3.4-alt1
+- 1.3.4
+
+* Sat Jul 24 2010 Valery Inozemtsev <shrek@altlinux.ru> 1.3.3-alt1
+- 1.3.3
+
+* Sun Apr 04 2010 Valery Inozemtsev <shrek@altlinux.ru> 1.3.2-alt3
+- GIT snapshot 2010-02-11 (d138c73276226ce424d36e80ce745aa9461f110e)
+
+* Sun Sep 13 2009 Valery Inozemtsev <shrek@altlinux.ru> 1.3.2-alt2
+- removed xkeystone (closes: #21549)
+
+* Fri Sep 11 2009 Valery Inozemtsev <shrek@altlinux.ru> 1.3.2-alt1
+- 1.3.2
+
+* Tue Aug 11 2009 Valery Inozemtsev <shrek@altlinux.ru> 1.3.1-alt1
+- 1.3.1
+
+* Thu Apr 02 2009 Valery Inozemtsev <shrek@altlinux.ru> 1.3.0-alt1
+- 1.3.0
+
+* Sun Feb 01 2009 Valery Inozemtsev <shrek@altlinux.ru> 1.2.99.4-alt1
+- 1.2.99.4
+
+* Tue Jan 13 2009 Valery Inozemtsev <shrek@altlinux.ru> 1.2.99.3-alt1
+- 1.2.99.3
+
+* Wed Aug 20 2008 Valery Inozemtsev <shrek@altlinux.ru> 1.2.3-alt2
+- updated manpage
+
+* Sat Mar 08 2008 Valery Inozemtsev <shrek@altlinux.ru> 1.2.3-alt1
+- 1.2.3
+
+* Thu Jan 03 2008 Valery Inozemtsev <shrek@altlinux.ru> 1.2.2-alt2
+- GIT snapshot 2007-12-15 (close #13854)
+
+* Sat Aug 11 2007 Valery Inozemtsev <shrek@altlinux.ru> 1.2.2-alt1
+- 1.2.2
+
+* Thu Apr 26 2007 Valery Inozemtsev <shrek@altlinux.ru> 1.2.0-alt3
+- GIT snapshot 2007-04-25 (739f01957c8ebd3b7bcecfd7ad8174884561f7db)
+
+* Fri Apr 20 2007 Valery Inozemtsev <shrek@altlinux.ru> 1.2.0-alt2
+- GIT snapshot 2007-04-06 (49aab1e0e4cb2226d5bcc8e4e6217309fd23ce52)
+
+* Tue Mar 13 2007 Valery Inozemtsev <shrek@altlinux.ru> 1.2.0-alt1
+- 1.2.0
+
+* Thu Apr 27 2006 Valery Inozemtsev <shrek@altlinux.ru> 1.0.2-alt1
+- 1.0.2
+
+* Tue Mar 21 2006 Valery Inozemtsev <shrek@altlinux.ru> 1.0.1-alt2
+- CVS snapshot 2006-03-20
+
+* Wed Dec 28 2005 Valery Inozemtsev <shrek@altlinux.ru> 1.0.1-alt1
+- Xorg-7.0
+
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin