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 2023-07-18 22:07:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wlr-randr (Old)
 and      /work/SRC/openSUSE:Factory/.wlr-randr.new.3193 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wlr-randr"

Tue Jul 18 22:07:21 2023 rev:3 rq:1099045 version:0.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/wlr-randr/wlr-randr.changes      2021-02-07 
15:24:15.514215588 +0100
+++ /work/SRC/openSUSE:Factory/.wlr-randr.new.3193/wlr-randr.changes    
2023-07-18 22:07:31.046785420 +0200
@@ -1,0 +2,12 @@
+Mon Jul 17 08:02:51 UTC 2023 - Denys Kondratenko <[email protected]>
+
+- wlr-randr v0.3.0
+  * add an option to toggle output
+  * Support wlr-output-management version 2
+  * Support output-management version 3 release requests
+  * Support output-management version 4 adaptive sync
+  * Fix typo in --adaptive-sync CLI
+  * readme: add links to new issue tracker, IRC channel and mailing list
+  * Retain head/mode ordering
+
+-------------------------------------------------------------------

Old:
----
  wlr-randr-0.2.0.tar.gz

New:
----
  wlr-randr-0.3.0.tar.gz

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

Other differences:
------------------
++++++ wlr-randr.spec ++++++
--- /var/tmp/diff_new_pack.0xmKyY/_old  2023-07-18 22:07:31.710789132 +0200
+++ /var/tmp/diff_new_pack.0xmKyY/_new  2023-07-18 22:07:31.718789177 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package wlr-randr
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
 
 
 Name:           wlr-randr
-Version:        0.2.0
+Version:        0.3.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.2.0/wlr-randr-%{version}.tar.gz
+URL:            https://git.sr.ht/~emersion/wlr-randr
+Source:         
https://git.sr.ht/~emersion/wlr-randr/refs/download/v0.3.0/wlr-randr-%{version}.tar.gz
 BuildRequires:  meson >= 0.47.0
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(wayland-client)

++++++ wlr-randr-0.2.0.tar.gz -> wlr-randr-0.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wlr-randr-0.2.0/README.md 
new/wlr-randr-0.3.0/README.md
--- old/wlr-randr-0.2.0/README.md       2021-02-05 14:26:21.000000000 +0100
+++ new/wlr-randr-0.3.0/README.md       2023-01-24 19:26:57.000000000 +0100
@@ -15,6 +15,15 @@
     ninja -C build
     build/wlr-randr
 
+## Contributing
+
+Report bugs on the [issue tracker], ask questions on the [IRC channel], send
+patches on the [mailing list].
+
 ## License
 
 MIT
+
+[issue tracker]: https://todo.sr.ht/~emersion/wlr-randr
+[IRC channel]: ircs://irc.libera.chat/#emersion
+[mailing list]: https://lists.sr.ht/~emersion/public-inbox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wlr-randr-0.2.0/main.c new/wlr-randr-0.3.0/main.c
--- old/wlr-randr-0.2.0/main.c  2021-02-05 14:26:21.000000000 +0100
+++ new/wlr-randr-0.3.0/main.c  2023-01-24 19:26:57.000000000 +0100
@@ -29,6 +29,7 @@
        struct wl_list link;
 
        char *name, *description;
+       char *make, *model, *serial_number;
        int32_t phys_width, phys_height; // mm
        struct wl_list modes;
 
@@ -41,6 +42,7 @@
        int32_t x, y;
        enum wl_output_transform transform;
        double scale;
+       enum zwlr_output_head_v1_adaptive_sync_state adaptive_sync_state;
 };
 
 struct randr_state {
@@ -67,11 +69,20 @@
        struct randr_head *head;
        wl_list_for_each(head, &state->heads, link) {
                printf("%s \"%s\"\n", head->name, head->description);
+
+               if (zwlr_output_manager_v1_get_version(state->output_manager) 
>= 2) {
+                       printf("  Make: %s\n", head->make);
+                       printf("  Model: %s\n", head->model);
+                       printf("  Serial: %s\n", head->serial_number);
+               }
+
                if (head->phys_width > 0 && head->phys_height > 0) {
                        printf("  Physical size: %dx%d mm\n",
                                head->phys_width, head->phys_height);
                }
+
                printf("  Enabled: %s\n", head->enabled ? "yes" : "no");
+
                if (!wl_list_empty(&head->modes)) {
                        printf("  Modes:\n");
                        struct randr_mode *mode;
@@ -105,6 +116,17 @@
                printf("  Position: %d,%d\n", head->x, head->y);
                printf("  Transform: %s\n", 
output_transform_map[head->transform]);
                printf("  Scale: %f\n", head->scale);
+
+               if (zwlr_output_manager_v1_get_version(state->output_manager) 
>= 4) {
+                       switch (head->adaptive_sync_state) {
+                       case ZWLR_OUTPUT_HEAD_V1_ADAPTIVE_SYNC_STATE_ENABLED:
+                               printf("  Adaptive Sync: enabled\n");
+                               break;
+                       case ZWLR_OUTPUT_HEAD_V1_ADAPTIVE_SYNC_STATE_DISABLED:
+                               printf("  Adaptive Sync: disabled\n");
+                               break;
+                       }
+               }
        }
 
        state->running = false;
@@ -172,6 +194,11 @@
                        head->transform);
                zwlr_output_configuration_head_v1_set_scale(config_head,
                        wl_fixed_from_double(head->scale));
+
+               if (zwlr_output_manager_v1_get_version(state->output_manager) 
>= 4) {
+                       
zwlr_output_configuration_head_v1_set_adaptive_sync(config_head,
+                               head->adaptive_sync_state);
+               }
        }
 
        if (dry_run) {
@@ -204,7 +231,11 @@
                struct zwlr_output_mode_v1 *wlr_mode) {
        struct randr_mode *mode = data;
        wl_list_remove(&mode->link);
-       zwlr_output_mode_v1_destroy(mode->wlr_mode);
+       if (zwlr_output_mode_v1_get_version(mode->wlr_mode) >= 3) {
+               zwlr_output_mode_v1_release(mode->wlr_mode);
+       } else {
+               zwlr_output_mode_v1_destroy(mode->wlr_mode);
+       }
        free(mode);
 }
 
@@ -242,7 +273,7 @@
        struct randr_mode *mode = calloc(1, sizeof(*mode));
        mode->head = head;
        mode->wlr_mode = wlr_mode;
-       wl_list_insert(&head->modes, &mode->link);
+       wl_list_insert(head->modes.prev, &mode->link);
 
        zwlr_output_mode_v1_add_listener(wlr_mode, &mode_listener, mode);
 }
@@ -294,12 +325,40 @@
                struct zwlr_output_head_v1 *wlr_head) {
        struct randr_head *head = data;
        wl_list_remove(&head->link);
-       zwlr_output_head_v1_destroy(head->wlr_head);
+       if (zwlr_output_head_v1_get_version(head->wlr_head) >= 3) {
+               zwlr_output_head_v1_release(head->wlr_head);
+       } else {
+               zwlr_output_head_v1_destroy(head->wlr_head);
+       }
        free(head->name);
        free(head->description);
        free(head);
 }
 
+static void head_handle_make(void *data,
+               struct zwlr_output_head_v1 *wlr_head, const char *make) {
+       struct randr_head *head = data;
+       head->make = strdup(make);
+}
+
+static void head_handle_model(void *data,
+               struct zwlr_output_head_v1 *wlr_head, const char *model) {
+       struct randr_head *head = data;
+       head->model = strdup(model);
+}
+
+static void head_handle_serial_number(void *data,
+               struct zwlr_output_head_v1 *wlr_head, const char 
*serial_number) {
+       struct randr_head *head = data;
+       head->serial_number = strdup(serial_number);
+}
+
+static void head_handle_adaptive_sync(void *data,
+               struct zwlr_output_head_v1 *wlr_head, uint32_t state) {
+       struct randr_head *head = data;
+       head->adaptive_sync_state = state;
+}
+
 static const struct zwlr_output_head_v1_listener head_listener = {
        .name = head_handle_name,
        .description = head_handle_description,
@@ -311,6 +370,10 @@
        .transform = head_handle_transform,
        .scale = head_handle_scale,
        .finished = head_handle_finished,
+       .make = head_handle_make,
+       .model = head_handle_model,
+       .serial_number = head_handle_serial_number,
+       .adaptive_sync = head_handle_adaptive_sync,
 };
 
 static void output_manager_handle_head(void *data,
@@ -323,7 +386,7 @@
        head->wlr_head = wlr_head;
        head->scale = 1.0;
        wl_list_init(&head->modes);
-       wl_list_insert(&state->heads, &head->link);
+       wl_list_insert(state->heads.prev, &head->link);
 
        zwlr_output_head_v1_add_listener(wlr_head, &head_listener, head);
 }
@@ -350,8 +413,9 @@
        struct randr_state *state = data;
 
        if (strcmp(interface, zwlr_output_manager_v1_interface.name) == 0) {
+               uint32_t version_to_bind = version <= 4 ? version : 4;
                state->output_manager = wl_registry_bind(registry, name,
-                       &zwlr_output_manager_v1_interface, 1);
+                       &zwlr_output_manager_v1_interface, version_to_bind);
                zwlr_output_manager_v1_add_listener(state->output_manager,
                        &output_manager_listener, state);
        }
@@ -373,12 +437,14 @@
        {"output", required_argument, 0, 0},
        {"on", no_argument, 0, 0},
        {"off", no_argument, 0, 0},
+       {"toggle", 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},
        {"scale", required_argument, 0, 0},
+       {"adaptive-sync", required_argument, 0, 0},
        {0},
 };
 
@@ -466,6 +532,13 @@
                head->enabled = true;
        } else if (strcmp(name, "off") == 0) {
                head->enabled = false;
+       } else if (strcmp(name, "toggle") == 0) {
+               if (head->enabled) {
+                       head->enabled = false;
+               } else {
+                       fixup_disabled_head(head);
+                       head->enabled = true;
+               }
        } else if (strcmp(name, "mode") == 0) {
                int width, height, refresh;
                if (!parse_mode(value, &width, &height, &refresh)) {
@@ -563,6 +636,19 @@
                }
 
                head->scale = scale;
+       } else if (strcmp(name, "adaptive-sync") == 0) {
+               if (zwlr_output_head_v1_get_version(head->wlr_head) < 4) {
+                       fprintf(stderr, "setting adaptive sync not supported by 
the compositor\n");
+                       return false;
+               }
+               if (strcmp(value, "enabled") == 0) {
+                       head->adaptive_sync_state = 
ZWLR_OUTPUT_HEAD_V1_ADAPTIVE_SYNC_STATE_ENABLED;
+               } else if (strcmp(value, "disabled") == 0) {
+                       head->adaptive_sync_state = 
ZWLR_OUTPUT_HEAD_V1_ADAPTIVE_SYNC_STATE_DISABLED;
+               } else {
+                       fprintf(stderr, "invalid adaptive sync state: %s\n", 
value);
+                       return false;
+               }
        } else {
                fprintf(stderr, "invalid option: %s\n", name);
                return false;
@@ -578,11 +664,13 @@
        "--output <name>\n"
        "  --on\n"
        "  --off\n"
+       "  --toggle\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";
+       "  --scale <factor>\n"
+       "  --adaptive-sync enabled|disabled\n";
 
 int main(int argc, char *argv[]) {
        struct randr_state state = { .running = true };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wlr-randr-0.2.0/meson.build 
new/wlr-randr-0.3.0/meson.build
--- old/wlr-randr-0.2.0/meson.build     2021-02-05 14:26:21.000000000 +0100
+++ new/wlr-randr-0.3.0/meson.build     2023-01-24 19:26:57.000000000 +0100
@@ -1,10 +1,10 @@
 project(
-  'wlr-randr',
-  'c',
-version : '0.2.0',
-license : 'MIT',
-meson_version : '>=0.47.0',
-default_options : ['c_std=c99', 'warning_level=3', 'werror=true']
+       'wlr-randr',
+       'c',
+       version : '0.3.0',
+       license : 'MIT',
+       meson_version : '>=0.47.0',
+       default_options : ['c_std=c99', 'warning_level=3', 'werror=true']
 )
 
 cc = meson.get_compiler('c')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wlr-randr-0.2.0/protocol/wlr-output-management-unstable-v1.xml 
new/wlr-randr-0.3.0/protocol/wlr-output-management-unstable-v1.xml
--- old/wlr-randr-0.2.0/protocol/wlr-output-management-unstable-v1.xml  
2021-02-05 14:26:21.000000000 +0100
+++ new/wlr-randr-0.3.0/protocol/wlr-output-management-unstable-v1.xml  
2023-01-24 19:26:57.000000000 +0100
@@ -39,7 +39,7 @@
     interface version number is reset.
   </description>
 
-  <interface name="zwlr_output_manager_v1" version="1">
+  <interface name="zwlr_output_manager_v1" version="4">
     <description summary="output device configuration manager">
       This interface is a manager that allows reading and writing the current
       output device configuration.
@@ -115,7 +115,7 @@
       </description>
     </request>
 
-    <event name="finished">
+    <event name="finished" type="destructor">
       <description summary="the compositor has finished with the manager">
         This event indicates that the compositor is done sending manager 
events.
         The compositor will destroy the object immediately after sending this
@@ -125,7 +125,7 @@
     </event>
   </interface>
 
-  <interface name="zwlr_output_head_v1" version="1">
+  <interface name="zwlr_output_head_v1" version="4">
     <description summary="output device">
       A head is an output device. The difference between a wl_output object and
       a head is that heads are advertised even if they are turned off. A head
@@ -251,15 +251,112 @@
     </event>
 
     <event name="finished">
-      <description summary="the head has been destroyed">
-        The compositor will destroy the object immediately after sending this
-        event, so it will become invalid and the client should release any
-        resources associated with it.
+      <description summary="the head has disappeared">
+        This event indicates that the head is no longer available. The head
+        object becomes inert. Clients should send a destroy request and release
+        any resources associated with it.
+      </description>
+    </event>
+
+    <!-- Version 2 additions -->
+
+    <event name="make" since="2">
+      <description summary="head manufacturer">
+        This event describes the manufacturer of the head.
+
+        This must report the same make as the wl_output interface does in its
+        geometry event.
+
+        Together with the model and serial_number events the purpose is to
+        allow clients to recognize heads from previous sessions and for example
+        load head-specific configurations back.
+
+        It is not guaranteed this event will be ever sent. A reason for that
+        can be that the compositor does not have information about the make of
+        the head or the definition of a make is not sensible in the current
+        setup, for example in a virtual session. Clients can still try to
+        identify the head by available information from other events but should
+        be aware that there is an increased risk of false positives.
+
+        It is not recommended to display the make string in UI to users. For
+        that the string provided by the description event should be preferred.
+      </description>
+      <arg name="make" type="string"/>
+    </event>
+
+    <event name="model" since="2">
+      <description summary="head model">
+        This event describes the model of the head.
+
+        This must report the same model as the wl_output interface does in its
+        geometry event.
+
+        Together with the make and serial_number events the purpose is to
+        allow clients to recognize heads from previous sessions and for example
+        load head-specific configurations back.
+
+        It is not guaranteed this event will be ever sent. A reason for that
+        can be that the compositor does not have information about the model of
+        the head or the definition of a model is not sensible in the current
+        setup, for example in a virtual session. Clients can still try to
+        identify the head by available information from other events but should
+        be aware that there is an increased risk of false positives.
+
+        It is not recommended to display the model string in UI to users. For
+        that the string provided by the description event should be preferred.
+      </description>
+      <arg name="model" type="string"/>
+    </event>
+
+    <event name="serial_number" since="2">
+      <description summary="head serial number">
+        This event describes the serial number of the head.
+
+        Together with the make and model events the purpose is to allow clients
+        to recognize heads from previous sessions and for example load head-
+        specific configurations back.
+
+        It is not guaranteed this event will be ever sent. A reason for that
+        can be that the compositor does not have information about the serial
+        number of the head or the definition of a serial number is not sensible
+        in the current setup. Clients can still try to identify the head by
+        available information from other events but should be aware that there
+        is an increased risk of false positives.
+
+        It is not recommended to display the serial_number string in UI to
+        users. For that the string provided by the description event should be
+        preferred.
+      </description>
+      <arg name="serial_number" type="string"/>
+    </event>
+
+    <!-- Version 3 additions -->
+
+    <request name="release" type="destructor" since="3">
+      <description summary="destroy the head object">
+        This request indicates that the client will no longer use this head
+        object.
+      </description>
+    </request>
+
+    <!-- Version 4 additions -->
+
+    <enum name="adaptive_sync_state" since="4">
+      <entry name="disabled" value="0" summary="adaptive sync is disabled"/>
+      <entry name="enabled" value="1" summary="adaptive sync is enabled"/>
+    </enum>
+
+    <event name="adaptive_sync" since="4">
+      <description summary="current adaptive sync state">
+        This event describes whether adaptive sync is currently enabled for
+        the head or not. Adaptive sync is also known as Variable Refresh
+        Rate or VRR.
       </description>
+      <arg name="state" type="uint" enum="adaptive_sync_state"/>
     </event>
   </interface>
 
-  <interface name="zwlr_output_mode_v1" version="1">
+  <interface name="zwlr_output_mode_v1" version="3">
     <description summary="output mode">
       This object describes an output mode.
 
@@ -297,15 +394,24 @@
     </event>
 
     <event name="finished">
-      <description summary="the mode has been destroyed">
-        The compositor will destroy the object immediately after sending this
-        event, so it will become invalid and the client should release any
-        resources associated with it.
+      <description summary="the mode has disappeared">
+        This event indicates that the mode is no longer available. The mode
+        object becomes inert. Clients should send a destroy request and release
+        any resources associated with it.
       </description>
     </event>
+
+    <!-- Version 3 additions -->
+
+    <request name="release" type="destructor" since="3">
+      <description summary="destroy the mode object">
+        This request indicates that the client will no longer use this mode
+        object.
+      </description>
+    </request>
   </interface>
 
-  <interface name="zwlr_output_configuration_v1" version="1">
+  <interface name="zwlr_output_configuration_v1" version="4">
     <description summary="output configuration">
       This object is used by the client to describe a full output 
configuration.
 
@@ -423,7 +529,7 @@
     </request>
   </interface>
 
-  <interface name="zwlr_output_configuration_head_v1" version="1">
+  <interface name="zwlr_output_configuration_head_v1" version="4">
     <description summary="head configuration">
       This object is used by the client to update a single head's 
configuration.
 
@@ -436,6 +542,8 @@
       <entry name="invalid_custom_mode" value="3" summary="mode is invalid"/>
       <entry name="invalid_transform" value="4" summary="transform value 
outside enum"/>
       <entry name="invalid_scale" value="5" summary="scale negative or zero"/>
+      <entry name="invalid_adaptive_sync_state" value="6" since="4"
+        summary="invalid enum value used in the set_adaptive_sync request"/>
     </enum>
 
     <request name="set_mode">
@@ -479,5 +587,15 @@
       </description>
       <arg name="scale" type="fixed"/>
     </request>
+
+    <!-- Version 4 additions -->
+
+    <request name="set_adaptive_sync" since="4">
+      <description summary="enable/disable adaptive sync">
+        This request enables/disables adaptive sync. Adaptive sync is also
+        known as Variable Refresh Rate or VRR.
+      </description>
+      <arg name="state" type="uint" 
enum="zwlr_output_head_v1.adaptive_sync_state"/>
+    </request>
   </interface>
 </protocol>

Reply via email to