Hello community,

here is the log from the commit of package xrandr for openSUSE:Factory checked 
in at 2017-11-23 09:35:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xrandr (Old)
 and      /work/SRC/openSUSE:Factory/.xrandr.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xrandr"

Thu Nov 23 09:35:11 2017 rev:13 rq:544170 version:1.5.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/xrandr/xrandr.changes    2017-06-04 
01:45:49.750877744 +0200
+++ /work/SRC/openSUSE:Factory/.xrandr.new/xrandr.changes       2017-11-23 
09:35:13.328637403 +0100
@@ -1,0 +2,13 @@
+Mon Nov 20 23:06:03 UTC 2017 - [email protected]
+
+- Add U_xrandr_suppress-misleading-indentation-warning.patch: When
+  printing out rotations, we print a space before any item other
+  than the first, and set `first = False` in each block where we
+  print. However, this is done in the same line as the conditional
+  that checks if first is set, which may give the impression that
+  the assignment is also under the conditional. This is not the
+  case, and recent GCC warns about this.
+- Add U_xrandr_add-filter-flag.patch: Flag can be set to
+  "nearest" or "bilinear".
+
+-------------------------------------------------------------------

New:
----
  U_xrandr_add-filter-flag.patch
  U_xrandr_suppress-misleading-indentation-warning.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xrandr.spec ++++++
--- /var/tmp/diff_new_pack.m2QRD3/_old  2017-11-23 09:35:13.948614783 +0100
+++ /var/tmp/diff_new_pack.m2QRD3/_new  2017-11-23 09:35:13.948614783 +0100
@@ -26,6 +26,8 @@
 Source0:        
http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2
 # PATCH-FEATURE-UPSTREAM xrandr-print-outputs-per-provider.patch 
[email protected] - Make the --listproviders option also print which outputs 
are supported by each provider
 Patch1:         xrandr-print-outputs-per-provider.patch
+Patch2:         U_xrandr_suppress-misleading-indentation-warning.patch
+Patch3:         U_xrandr_add-filter-flag.patch
 BuildRequires:  pkg-config
 BuildRequires:  pkgconfig(x11)
 BuildRequires:  pkgconfig(xorg-macros) >= 1.8
@@ -47,6 +49,8 @@
 %prep
 %setup -q
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %configure

++++++ U_xrandr_add-filter-flag.patch ++++++
>From 6ac2afc0d7d8d51d4085767b901667393c11061b Mon Sep 17 00:00:00 2001
From: Pablo De La Garza <[email protected]>
Date: Thu, 23 Mar 2017 16:05:02 -0700
Subject: xrandr: Add a "--filter" flag

Flag can be set to "nearest" or "bilinear"

Signed-off-by: Pablo De La Garza <[email protected]>
[[email protected]: Fixed style and whitespace]
Signed-off-by: Aaron Plattner <[email protected]>

diff --git a/xrandr.c b/xrandr.c
index 2aad946..2d4cb72 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", 
@@ -135,6 +140,7 @@ usage(void)
            "      --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"
@@ -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 {
@@ -1311,6 +1318,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))
@@ -2808,6 +2819,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]);
-- 
cgit v0.10.2


>From 8969b3c651eaae3e3a2370ec45f4eeae9750111d Mon Sep 17 00:00:00 2001
From: Aaron Plattner <[email protected]>
Date: Thu, 1 Jun 2017 15:45:59 -0700
Subject: man: Document the new --filter option

Signed-off-by: Aaron Plattner <[email protected]>
Reviewed-by: Peter Hutterer <[email protected]>
Signed-off-by: Peter Hutterer <[email protected]>

diff --git a/man/xrandr.man b/man/xrandr.man
index 55ea5dd..65ccc2a 100644
--- a/man/xrandr.man
+++ b/man/xrandr.man
@@ -155,7 +155,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
@@ -201,6 +203,10 @@ 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 "\-\-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\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
-- 
cgit v0.10.2
++++++ U_xrandr_suppress-misleading-indentation-warning.patch ++++++
>From 215a01f1513f918e7295a8a477d4674f7b8085f0 Mon Sep 17 00:00:00 2001
From: Giuseppe Bilotta <[email protected]>
Date: Wed, 18 Jan 2017 08:52:23 +0100
Subject: xrandr: suppress misleading indentation warning

When printing out rotations, we print a space before any item other than
the first, and set `first = False` in each block where we print.
However, this is done in the same line as the conditional that checks if
first is set, which may give the impression that the assignment is also
under the conditional. This is not the case, and recent GCC warns about
this.

Move the assignment to after we print the value we want to print, which
(1) doesn't mislead about the indentation, and
(2) makes logical sense as the _next_ entry is what won't be the first.

Signed-off-by: Giuseppe Bilotta <[email protected]>

diff --git a/xrandr.c b/xrandr.c
index dcfdde0..2aad946 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -3703,14 +3703,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)
                {
-- 
cgit v0.10.2

Reply via email to