Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package wlr-randr for openSUSE:Factory checked in at 2021-02-07 15:21:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wlr-randr (Old) and /work/SRC/openSUSE:Factory/.wlr-randr.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wlr-randr" Sun Feb 7 15:21:39 2021 rev:2 rq:869809 version:0.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/wlr-randr/wlr-randr.changes 2020-08-03 14:17:56.200652556 +0200 +++ /work/SRC/openSUSE:Factory/.wlr-randr.new.28504/wlr-randr.changes 2021-02-07 15:24:15.514215588 +0100 @@ -1,0 +2,7 @@ +Fri Feb 5 16:00:50 UTC 2021 - Denys Kondratenko <[email protected]> + +- Bump version to 0.2.0 + * Add --preferred + * Fix mode refresh rounding issue + +------------------------------------------------------------------- Old: ---- wlr-randr-0.1.0.tar.gz New: ---- wlr-randr-0.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wlr-randr.spec ++++++ --- /var/tmp/diff_new_pack.4M0aHK/_old 2021-02-07 15:24:15.978216118 +0100 +++ /var/tmp/diff_new_pack.4M0aHK/_new 2021-02-07 15:24:15.982216123 +0100 @@ -17,13 +17,13 @@ Name: wlr-randr -Version: 0.1.0 +Version: 0.2.0 Release: 0 Summary: Utility to manage outputs of a Wayland compositor License: MIT Group: Productivity/Graphics/Other URL: https://github.com/emersion/wlr-randr -Source: https://github.com/emersion/wlr-randr/releases/download/v0.1.0/wlr-randr-%{version}.tar.gz +Source: https://github.com/emersion/wlr-randr/releases/download/v0.2.0/wlr-randr-%{version}.tar.gz BuildRequires: meson >= 0.47.0 BuildRequires: pkgconfig BuildRequires: pkgconfig(wayland-client) ++++++ wlr-randr-0.1.0.tar.gz -> wlr-randr-0.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlr-randr-0.1.0/main.c new/wlr-randr-0.2.0/main.c --- old/wlr-randr-0.1.0/main.c 2020-07-27 16:33:25.000000000 +0200 +++ new/wlr-randr-0.2.0/main.c 2021-02-05 14:26:21.000000000 +0100 @@ -2,6 +2,7 @@ #include <assert.h> #include <errno.h> #include <getopt.h> +#include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> @@ -373,6 +374,7 @@ {"on", no_argument, 0, 0}, {"off", no_argument, 0, 0}, {"mode", required_argument, 0, 0}, + {"preferred", no_argument, 0, 0}, {"custom-mode", required_argument, 0, 0}, {"pos", required_argument, 0, 0}, {"transform", required_argument, 0, 0}, @@ -429,7 +431,7 @@ return false; } - *refresh = refresh_hz * 1000; // Hz ??? mHz + *refresh = round(refresh_hz * 1000); // Hz ??? mHz } } @@ -489,6 +491,25 @@ head->custom_mode.width = 0; head->custom_mode.height = 0; head->custom_mode.refresh = 0; + } else if (strcmp(name, "preferred") == 0) { + bool found = false; + struct randr_mode *mode; + wl_list_for_each(mode, &head->modes, link) { + if (mode->preferred) { + found = true; + break; + } + } + + if (!found) { + fprintf(stderr, "no preferred mode found\n"); + return false; + } + + head->mode = mode; + head->custom_mode.width = 0; + head->custom_mode.height = 0; + head->custom_mode.refresh = 0; } else if (strcmp(name, "custom-mode") == 0) { int width, height, refresh; if (!parse_mode(value, &width, &height, &refresh)) { @@ -558,6 +579,7 @@ " --on\n" " --off\n" " --mode|--custom-mode <width>x<height>[@<refresh>Hz]\n" + " --preferred\n" " --pos <x>,<y>\n" " --transform normal|90|180|270|flipped|flipped-90|flipped-180|flipped-270\n" " --scale <factor>\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlr-randr-0.1.0/meson.build new/wlr-randr-0.2.0/meson.build --- old/wlr-randr-0.1.0/meson.build 2020-07-27 16:33:25.000000000 +0200 +++ new/wlr-randr-0.2.0/meson.build 2021-02-05 14:26:21.000000000 +0100 @@ -1,14 +1,10 @@ project( - 'wlr-randr', - 'c', - version: '0.1.0', - license: 'MIT', - meson_version: '>=0.47.0', - default_options: [ - 'c_std=c99', - 'warning_level=3', - 'werror=true', - ], + 'wlr-randr', + 'c', +version : '0.2.0', +license : 'MIT', +meson_version : '>=0.47.0', +default_options : ['c_std=c99', 'warning_level=3', 'werror=true'] ) cc = meson.get_compiler('c') @@ -36,11 +32,13 @@ wayland_client = dependency('wayland-client') +math = cc.find_library('m', required: false) + subdir('protocol') wlr_randr_exe = executable( meson.project_name(), files(['main.c']), - dependencies: [wayland_client, client_protos], + dependencies: [wayland_client, client_protos, math], install: true, )
