Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package waynergy for openSUSE:Factory 
checked in at 2024-05-20 18:12:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/waynergy (Old)
 and      /work/SRC/openSUSE:Factory/.waynergy.new.1880 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "waynergy"

Mon May 20 18:12:45 2024 rev:2 rq:1175028 version:0.17+0

Changes:
--------
--- /work/SRC/openSUSE:Factory/waynergy/waynergy.changes        2023-07-17 
19:23:19.749752283 +0200
+++ /work/SRC/openSUSE:Factory/.waynergy.new.1880/waynergy.changes      
2024-05-20 18:14:04.503685788 +0200
@@ -1,0 +2,11 @@
+Mon Apr 29 21:28:41 UTC 2024 - malcolmle...@opensuse.org
+
+- Update to version 0.17+0:
+  + idle: support ext-idle-notify-v1 protocol.
+  + Support updating input backend geometry,
+    (gh#r-c-f/waynergy#93).
+  + Add user events for enter/exit, (gh#r-c-f/waynergy#89 and
+    gh#r-c-f/waynergy#90).
+  + Update README.md, (gh#r-c-f/waynergy#86).
+
+-------------------------------------------------------------------

Old:
----
  waynergy-0.16+3.obscpio

New:
----
  waynergy-0.17+0.obscpio

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

Other differences:
------------------
++++++ waynergy.spec ++++++
--- /var/tmp/diff_new_pack.CAzddr/_old  2024-05-20 18:14:05.439719813 +0200
+++ /var/tmp/diff_new_pack.CAzddr/_new  2024-05-20 18:14:05.443719959 +0200
@@ -1,7 +1,8 @@
 #
 # spec file for package waynergy
 #
-# Copyright (c) 2023 Malcolm J Lewis <malcolmle...@opensuse.org>
+# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2023-2024 Malcolm J Lewis <malcolmle...@opensuse.org>
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,11 +13,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 Name:           waynergy
-Version:        0.16+3
+Version:        0.17+0
 Release:        0
 License:        MIT
 Summary:        Synergy client for wayland compositors

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.CAzddr/_old  2024-05-20 18:14:05.487721559 +0200
+++ /var/tmp/diff_new_pack.CAzddr/_new  2024-05-20 18:14:05.491721704 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/r-c-f/waynergy.git</param>
-              <param 
name="changesrevision">13ea71c77a8961ed192e34affb53deb1960ca103</param></service></servicedata>
+              <param 
name="changesrevision">7f014dfdc0598e0148de069516607fbc492148ed</param></service></servicedata>
 (No newline at EOF)
 

++++++ waynergy-0.16+3.obscpio -> waynergy-0.17+0.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/README.md 
new/waynergy-0.17+0/README.md
--- old/waynergy-0.16+3/README.md       2023-05-29 23:55:35.000000000 +0200
+++ new/waynergy-0.17+0/README.md       2024-04-25 19:28:27.000000000 +0200
@@ -23,6 +23,7 @@
 - [AUR (release)](https://aur.archlinux.org/packages/waynergy)
 - [AUR (git master)](https://aur.archlinux.org/packages/waynergy-git)
 - [Gentoo ebuilds (by 
nrndda)](https://github.com/nrndda/nrndda-overlay/tree/master/gui-apps/waynergy)
+- [openSUSE Tumbleweed 
(Release)](https://software.opensuse.org/package/waynergy)
 
 #### Manual
 
@@ -284,6 +285,11 @@
 activated remotely, `screensaver/stop` should contain a command to terminate
 it when it is deactivated. 
 
+#### Enter/Exit events
+
+`screen/enter` and `screen/exit` should contain a command to be run when the 
+screen is entered or exited, respectively.
+
 #### Idle inhibition hack
 
 Due to issues with the idle inhibition protocol, idle is actually inhibited by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/doc/xkb/keycodes/mac 
new/waynergy-0.17+0/doc/xkb/keycodes/mac
--- old/waynergy-0.16+3/doc/xkb/keycodes/mac    2023-05-29 23:55:35.000000000 
+0200
+++ new/waynergy-0.17+0/doc/xkb/keycodes/mac    2024-04-25 19:28:27.000000000 
+0200
@@ -76,4 +76,31 @@
        <LEFT>  = 131;
        <DOWN>  = 133;
        <RGHT>  = 132;
+       <MENU>  = 118;
+       <PRSC>  = 113;
+       <SCLK>  = 115;
+       <PAUS>  = 121;
+       <INS>   = 122;
+       <DELE>  = 125;
+       <HOME>  = 123;
+       <END>   = 127;
+       <PGUP>  = 124;
+       <PGDN>  = 129;
+       <NMLK>  = 79;
+       <KPDV>  = 83;
+       <KPMU>  = 75;
+       <KPSU>  = 86;
+       <KP7>   = 97;
+       <KP8>   = 99;
+       <KP9>   = 100;
+       <KPAD>  = 77;
+       <KP4>   = 94;
+       <KP5>   = 95;
+       <KP6>   = 96;
+       <KP1>   = 91;
+       <KP2>   = 92;
+       <KP3>   = 93;
+       <KPEN>  = 84;
+       <KP0>   = 90;
+       <KPDL>  = 73;
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/include/wayland.h 
new/waynergy-0.17+0/include/wayland.h
--- old/waynergy-0.16+3/include/wayland.h       2023-05-29 23:55:35.000000000 
+0200
+++ new/waynergy-0.17+0/include/wayland.h       2024-04-25 19:28:27.000000000 
+0200
@@ -16,6 +16,7 @@
 #include "virtual-keyboard-unstable-v1-client-protocol.h"
 #include "xdg-output-unstable-v1-client-protocol.h"
 #include "idle-client-protocol.h"
+#include "ext-idle-notify-v1-client-protocol.h"
 #include "uSynergy.h"
 
 
@@ -49,6 +50,7 @@
        void (*inhibit_stop)(struct wlIdle *);
 };
 
+extern bool wlIdleInitExt(struct wlContext *ctx);
 extern bool wlIdleInitKde(struct wlContext *ctx);
 extern bool wlIdleInitGnome(struct wlContext *ctx);
 
@@ -83,6 +85,7 @@
        void (*mouse_wheel)(struct wlInput *, signed short dx, signed short dy);
        void (*key)(struct wlInput *, int, int);
        bool (*key_map)(struct wlInput *, char *);
+       void (*update_geom)(struct wlInput *);
 };
 
 /* uinput must open device fds before privileges are dropped, so this is
@@ -112,7 +115,8 @@
        struct zxdg_output_manager_v1 *output_manager;
        struct wlOutput *outputs;
        /* idle stuff */
-       struct org_kde_kwin_idle *idle_manager;
+       struct org_kde_kwin_idle *idle_manager; /* old KDE */
+       struct ext_idle_notifier_v1 *idle_notifier; /* new standard */
        struct wlIdle idle;
        //state
        int width;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/meson.build 
new/waynergy-0.17+0/meson.build
--- old/waynergy-0.16+3/meson.build     2023-05-29 23:55:35.000000000 +0200
+++ new/waynergy-0.17+0/meson.build     2024-04-25 19:28:27.000000000 +0200
@@ -1,12 +1,13 @@
 project('waynergy',
  'c',
- version: '0.0.16'
+ version: '0.0.17'
 )
 
 src_c = files(
   'src/wl_idle.c',
   'src/wl_idle_gnome.c',
   'src/wl_idle_kde.c',
+  'src/wl_idle_ext.c',
   'src/wl_input.c',
   'src/wl_input_wlr.c',
   'src/wl_input_kde.c',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/protocol/ext-idle-notify-v1.xml 
new/waynergy-0.17+0/protocol/ext-idle-notify-v1.xml
--- old/waynergy-0.16+3/protocol/ext-idle-notify-v1.xml 1970-01-01 
01:00:00.000000000 +0100
+++ new/waynergy-0.17+0/protocol/ext-idle-notify-v1.xml 2024-04-25 
19:28:27.000000000 +0200
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="ext_idle_notify_v1">
+  <copyright>
+    Copyright © 2015 Martin Gräßlin
+    Copyright © 2022 Simon Ser
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the "Software"),
+    to deal in the Software without restriction, including without limitation
+    the rights to use, copy, modify, merge, publish, distribute, sublicense,
+    and/or sell copies of the Software, and to permit persons to whom the
+    Software is furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice (including the next
+    paragraph) shall be included in all copies or substantial portions of the
+    Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+    DEALINGS IN THE SOFTWARE.
+  </copyright>
+
+  <interface name="ext_idle_notifier_v1" version="1">
+    <description summary="idle notification manager">
+      This interface allows clients to monitor user idle status.
+
+      After binding to this global, clients can create ext_idle_notification_v1
+      objects to get notified when the user is idle for a given amount of time.
+    </description>
+
+    <request name="destroy" type="destructor">
+      <description summary="destroy the manager">
+        Destroy the manager object. All objects created via this interface
+        remain valid.
+      </description>
+    </request>
+
+    <request name="get_idle_notification">
+      <description summary="create a notification object">
+        Create a new idle notification object.
+
+        The notification object has a minimum timeout duration and is tied to a
+        seat. The client will be notified if the seat is inactive for at least
+        the provided timeout. See ext_idle_notification_v1 for more details.
+
+        A zero timeout is valid and means the client wants to be notified as
+        soon as possible when the seat is inactive.
+      </description>
+      <arg name="id" type="new_id" interface="ext_idle_notification_v1"/>
+      <arg name="timeout" type="uint" summary="minimum idle timeout in msec"/>
+      <arg name="seat" type="object" interface="wl_seat"/>
+    </request>
+  </interface>
+
+  <interface name="ext_idle_notification_v1" version="1">
+    <description summary="idle notification">
+      This interface is used by the compositor to send idle notification events
+      to clients.
+
+      Initially the notification object is not idle. The notification object
+      becomes idle when no user activity has happened for at least the timeout
+      duration, starting from the creation of the notification object. User
+      activity may include input events or a presence sensor, but is
+      compositor-specific. If an idle inhibitor is active (e.g. another client
+      has created a zwp_idle_inhibitor_v1 on a visible surface), the compositor
+      must not make the notification object idle.
+
+      When the notification object becomes idle, an idled event is sent. When
+      user activity starts again, the notification object stops being idle,
+      a resumed event is sent and the timeout is restarted.
+    </description>
+
+    <request name="destroy" type="destructor">
+      <description summary="destroy the notification object">
+        Destroy the notification object.
+      </description>
+    </request>
+
+    <event name="idled">
+      <description summary="notification object is idle">
+        This event is sent when the notification object becomes idle.
+
+        It's a compositor protocol error to send this event twice without a
+        resumed event in-between.
+      </description>
+    </event>
+
+    <event name="resumed">
+      <description summary="notification object is no longer idle">
+        This event is sent when the notification object stops being idle.
+
+        It's a compositor protocol error to send this event twice without an
+        idled event in-between. It's a compositor protocol error to send this
+        event prior to any idled event.
+      </description>
+    </event>
+  </interface>
+</protocol>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/protocol/meson.build 
new/waynergy-0.17+0/protocol/meson.build
--- old/waynergy-0.16+3/protocol/meson.build    2023-05-29 23:55:35.000000000 
+0200
+++ new/waynergy-0.17+0/protocol/meson.build    2024-04-25 19:28:27.000000000 
+0200
@@ -17,6 +17,7 @@
 
 client_protocols = [
        ['idle.xml'],
+    ['ext-idle-notify-v1.xml'],
     ['fake-input.xml'],
     ['keyboard-shortcuts-inhibit-unstable-v1.xml'],
     ['virtual-keyboard-unstable-v1.xml'],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/src/main.c 
new/waynergy-0.17+0/src/main.c
--- old/waynergy-0.16+3/src/main.c      2023-05-29 23:55:35.000000000 +0200
+++ new/waynergy-0.17+0/src/main.c      2024-04-25 19:28:27.000000000 +0200
@@ -122,9 +122,25 @@
 }
 static void syn_active_cb(uSynergyCookie cookie, bool active)
 {
+       size_t i;
+       int ret;
+       char **cmd;
+
        if (!active) {
                wlKeyReleaseAll(&wlContext);
        }
+
+       cmd = configReadLines(active ? "screen/enter" : "screen/exit");
+       if (!cmd) {
+               return;
+       }
+       for (i = 0; cmd[i]; ++i) {
+               ret = system(cmd[i]);
+               if (ret) {
+                       logWarn("Screen state %s command #%zd (%s) failed with 
code %d", active ? "enter" : "exit", i, cmd[i], ret);
+               }
+       }
+       strfreev(cmd);
 }
 
 static void uinput_fd_open(int res[static 2])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/src/wayland.c 
new/waynergy-0.17+0/src/wayland.c
--- old/waynergy-0.16+3/src/wayland.c   2023-05-29 23:55:35.000000000 +0200
+++ new/waynergy-0.17+0/src/wayland.c   2024-04-25 19:28:27.000000000 +0200
@@ -465,6 +465,9 @@
        } else if (strcmp(interface, org_kde_kwin_idle_interface.name) == 0) {
                logDbg("Got idle manager");
                ctx->idle_manager = wl_registry_bind(registry, name, 
&org_kde_kwin_idle_interface, version);
+       } else if (strcmp(interface, ext_idle_notifier_v1_interface.name) == 0) 
{
+               logDbg("Got idle notifier");
+               ctx->idle_notifier = wl_registry_bind(registry, name, 
&ext_idle_notifier_v1_interface, version);
        }
 }
 
@@ -566,7 +569,9 @@
 
        /* initiailize idle inhibition */
        if (configTryBool("idle-inhibit/enable", true)) {
-               if (wlIdleInitKde(ctx)) {
+               if (wlIdleInitExt(ctx)) {
+                       logInfo("Using ext-idle-notify-v1 idle inhibition 
protocol");
+               } else if (wlIdleInitKde(ctx)) {
                        logInfo("Using KDE idle inhibition protocol");
                } else if (wlIdleInitGnome(ctx)) {
                        logInfo("Using GNOME idle inhibition through 
gnome-session-inhibit");
@@ -587,6 +592,11 @@
 {
        ctx->width = width;
        ctx->height = height;
+       if (ctx->input.update_geom) {
+               ctx->input.update_geom(&ctx->input);
+       } else {
+               logDbg("Current output backend does not update input geometry");
+       }
 }
 
 int wlPrepareFd(struct wlContext *ctx)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/src/wl_idle_ext.c 
new/waynergy-0.17+0/src/wl_idle_ext.c
--- old/waynergy-0.16+3/src/wl_idle_ext.c       1970-01-01 01:00:00.000000000 
+0100
+++ new/waynergy-0.17+0/src/wl_idle_ext.c       2024-04-25 19:28:27.000000000 
+0200
@@ -0,0 +1,100 @@
+#include "wayland.h"
+
+
+struct ext_state {
+       struct ext_idle_notification_v1_listener listener;
+       struct ext_idle_notification_v1 *notification;
+       xkb_keycode_t key;
+       int key_raw;
+       long idle_time;
+};
+
+static void on_idle_mouse(void *data, struct ext_idle_notification_v1 
*notification)
+{
+       struct wlIdle *idle = data;
+       logDbg("Got idle event, responding with zero mouse move");
+       wlMouseRelativeMotion(idle->wl_ctx, 0, 0);
+}
+static void on_idle_key(void *data, struct ext_idle_notification_v1 
*notification)
+{
+       struct wlIdle *idle = data;
+       struct ext_state *ext = idle->state;
+       //Second try at this -- press a key we do not care about
+       logDbg("Got idle event, responding with keypress");
+       if (ext->key_raw != -1) {
+               wlKeyRaw(idle->wl_ctx, ext->key_raw, true);
+               wlKeyRaw(idle->wl_ctx, ext->key_raw, false);
+       } else {
+               wlKey(idle->wl_ctx, ext->key, 0, true);
+               wlKey(idle->wl_ctx, ext->key, 0, false);
+       }
+}
+static void on_resumed(void *data, struct ext_idle_notification_v1 
*notification)
+{
+       logDbg("Got resume event");
+}
+
+static void inhibit_start(struct wlIdle *idle)
+{
+       struct ext_state *ext = idle->state;
+
+       ext->notification = 
ext_idle_notifier_v1_get_idle_notification(idle->wl_ctx->idle_notifier, 
ext->idle_time * 1000, idle->wl_ctx->seat);
+       if (!ext->notification) {
+               logErr("Could not get idle notification");
+               return;
+       }
+       ext_idle_notification_v1_add_listener(ext->notification, 
&ext->listener, idle);
+       wlDisplayFlush(idle->wl_ctx);
+}
+
+static void inhibit_stop(struct wlIdle *idle)
+{
+       struct ext_state *ext = idle->state;
+
+       if (!ext->notification) {
+               logDbg("Idle already not inhibited");
+               return;
+       }
+       ext_idle_notification_v1_destroy(ext->notification);
+       wlDisplayFlush(idle->wl_ctx);
+       ext->notification = NULL;
+}
+
+bool wlIdleInitExt(struct wlContext *ctx)
+{
+       char *idle_method;
+       char *idle_keyname;
+
+       if (!ctx->idle_notifier) {
+               logWarn("ext-idle-notify-v1 idle inhibit selected, but no idle 
notifier support");
+               return false;
+       }
+       struct ext_state *ext = xcalloc(1, sizeof(*ext));
+       ext->listener.resumed = on_resumed;
+
+       ext->idle_time = configTryLong("idle-inhibit/interval", 30);
+       idle_method = configTryString("idle-inhibit/method", "mouse");
+
+       if (!strcmp(idle_method, "mouse")) {
+               ext->listener.idled = on_idle_mouse;
+       } else if (!strcmp(idle_method, "key")) {
+               ext->listener.idled = on_idle_key;
+               /* first try a raw keycode for idle, because in case
+                * of uinput xkb map might be rather useless */
+               ext->key_raw = configTryLong("idle-inhibit/keycode", -1);
+               idle_keyname = configTryString("idle-inhibit/keyname", "HYPR");
+               ext->key = xkb_keymap_key_by_name(ctx->input.xkb_map, 
idle_keyname);
+               free(idle_keyname);
+       } else {
+               logErr("Unknown idle inhibition method %s, initialization 
failed", idle_method);
+               free(idle_method);
+               free(ext);
+               return false;
+       }
+       free(idle_method);
+       ctx->idle.wl_ctx = ctx;
+       ctx->idle.state = ext;
+       ctx->idle.inhibit_start = inhibit_start;
+       ctx->idle.inhibit_stop = inhibit_stop;
+       return true;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waynergy-0.16+3/src/wl_input_uinput.c 
new/waynergy-0.17+0/src/wl_input_uinput.c
--- old/waynergy-0.16+3/src/wl_input_uinput.c   2023-05-29 23:55:35.000000000 
+0200
+++ new/waynergy-0.17+0/src/wl_input_uinput.c   2024-04-25 19:28:27.000000000 
+0200
@@ -186,6 +186,21 @@
        return true;
 }
 
+static bool reinit_mouse(struct wlInput *input)
+{
+       struct state_uinput *ui = input->state;
+       TRY_IOCTL0(ui->mouse_fd, UI_DEV_DESTROY);
+       return init_mouse(input->wl_ctx, ui, input->wl_ctx->width, 
input->wl_ctx->height);
+}
+
+static void update_geom(struct wlInput *input)
+{
+       logDbg("uinput: updating geometry for mouse");
+       if (!reinit_mouse(input)) {
+               logErr("Could not reinitialize uinput for mouse");
+       }
+}
+
 bool wlInputInitUinput(struct wlContext *ctx)
 {
        struct state_uinput *ui;
@@ -213,6 +228,7 @@
                .mouse_wheel = mouse_wheel,
                .key = key,
                .key_map = key_map,
+               .update_geom = update_geom,
        };
        wlLoadButtonMap(ctx);
 

++++++ waynergy.obsinfo ++++++
--- /var/tmp/diff_new_pack.CAzddr/_old  2024-05-20 18:14:05.635726939 +0200
+++ /var/tmp/diff_new_pack.CAzddr/_new  2024-05-20 18:14:05.639727084 +0200
@@ -1,5 +1,5 @@
 name: waynergy
-version: 0.16+3
-mtime: 1685397335
-commit: 13ea71c77a8961ed192e34affb53deb1960ca103
+version: 0.17+0
+mtime: 1714066107
+commit: 7f014dfdc0598e0148de069516607fbc492148ed
 

Reply via email to