Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package at-spi2-core for openSUSE:Factory 
checked in at 2021-06-11 22:30:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/at-spi2-core (Old)
 and      /work/SRC/openSUSE:Factory/.at-spi2-core.new.32437 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "at-spi2-core"

Fri Jun 11 22:30:27 2021 rev:91 rq:898029 version:2.40.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/at-spi2-core/at-spi2-core.changes        
2021-05-06 22:51:33.991011985 +0200
+++ /work/SRC/openSUSE:Factory/.at-spi2-core.new.32437/at-spi2-core.changes     
2021-06-11 22:30:50.370147411 +0200
@@ -1,0 +2,8 @@
+Sun Jun  6 16:25:58 UTC 2021 - Bj??rn Lie <bjorn....@gmail.com>
+
+- Update to version 2.40.2:
+  + README: Remove outdated links.
+  + Key grab fixes for the new API.
+  + registryd: Add a missing call to va_end.
+
+-------------------------------------------------------------------

Old:
----
  at-spi2-core-2.40.1.tar.xz

New:
----
  at-spi2-core-2.40.2.tar.xz

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

Other differences:
------------------
++++++ at-spi2-core.spec ++++++
--- /var/tmp/diff_new_pack.f9OCkw/_old  2021-06-11 22:30:50.838148221 +0200
+++ /var/tmp/diff_new_pack.f9OCkw/_new  2021-06-11 22:30:50.842148228 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           at-spi2-core
-Version:        2.40.1
+Version:        2.40.2
 Release:        0
 Summary:        Assistive Technology Service Provider Interface - D-Bus based 
implementation
 License:        LGPL-2.1-or-later

++++++ at-spi2-core-2.40.1.tar.xz -> at-spi2-core-2.40.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/at-spi2-core-2.40.1/NEWS new/at-spi2-core-2.40.2/NEWS
--- old/at-spi2-core-2.40.1/NEWS        2021-05-01 19:18:26.378456400 +0200
+++ new/at-spi2-core-2.40.2/NEWS        2021-06-05 20:30:10.532779700 +0200
@@ -1,11 +1,18 @@
-What's new in at-spi2-core 2.39.91:
+What's new in at-spi2-core 2.40.2:
+
+* README: Remove outdated links.
+
+* Key grab fixes for the new API.
+
+* registryd: Add a missing call to va_end.
+
 What's new in at-spi2-core 2.40.1:
 
 * Fix double free when removing event listeners (#35).
 
 * Fix numlock detection.
 
-
+What's new in at-spi2-core 2.39.91:
 * Fix a couple of memory leaks.
 
 * Remove const from AtspiDeviceListenerCB prototype (#31).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/at-spi2-core-2.40.1/README 
new/at-spi2-core-2.40.2/README
--- old/at-spi2-core-2.40.1/README      2021-05-01 19:18:26.378456400 +0200
+++ new/at-spi2-core-2.40.2/README      2021-06-05 20:30:10.532779700 +0200
@@ -5,24 +5,22 @@
 It has been completely rewritten to use D-Bus rather than
 ORBIT / CORBA for its transport protocol.
 
-A page including instructions for testing, project status and
-TODO items is kept up to date at:
+An outdated page including instructions for testing, project status and
+TODO items is at:
 
-        http://www.linuxfoundation.org/en/AT-SPI_on_D-Bus
+        
https://wiki.linuxfoundation.org/accessibility/atk/at-spi/at-spi_on_d-bus
 
 The mailing list used for general questions is:
 
-        accessibility-at...@lists.linux-foundation.org
+        https://lists.linuxfoundation.org/mailman/listinfo/accessibility-atspi
 
-For bug reports, feature requests, patches or enhancements please use
-the AT-SPI project on bugzilla.gnome.org. Use the at-spi2-core component for
-bugs specific to this module.
+For bug reports, feature requests, patches or enhancements please use:
 
-        http://bugzilla.gnome.org
+        https://gitlab.gnome.org/GNOME/at-spi2-core/
 
 A git repository with the latest development code is available at:
 
-       git://git.gnome.org/at-spi2-core
+       https://gitlab.gnome.org/GNOME/at-spi2-core/
 
 More information
 ----------------
@@ -32,15 +30,13 @@
 mind that the D-Bus AT-SPI design documents on this page
 have not been kept up to date.
 
-        http://live.gnome.org/GAP/AtSpiDbusInvestigation/
+        
https://wiki.gnome.org/Accessibility/Documentation/GNOME2/ATSPI2-Investigation
 
 Other sources of relevant information about AT-SPI and Accessibility
 include:
 
-        http://live.gnome.org/Accessibility
-        http://www.sun.com/software/star/gnome/accessibility/architecture.xml
-        http://accessibility.kde.org/developer/atk.php
-        http://www.gnome.org/~billh/at-spi-idl/html/
+        https://wiki.gnome.org/Accessibility
+        https://community.kde.org/Accessibility
 
 
 Contents of this package
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/at-spi2-core-2.40.1/atspi/atspi-device-legacy.c 
new/at-spi2-core-2.40.2/atspi/atspi-device-legacy.c
--- old/at-spi2-core-2.40.1/atspi/atspi-device-legacy.c 2021-05-01 
19:18:26.382456300 +0200
+++ new/at-spi2-core-2.40.2/atspi/atspi-device-legacy.c 2021-06-05 
20:30:10.536779600 +0200
@@ -47,6 +47,7 @@
   GSList *modifiers;
   guint virtual_mods_enabled;
   gboolean keyboard_grabbed;
+  unsigned int numlock_physical_mask;
 };
 
 GObjectClass *device_legacy_parent_class;
@@ -91,13 +92,19 @@
   AtspiDeviceLegacy *legacy_device = ATSPI_DEVICE_LEGACY (user_data);
   AtspiDeviceLegacyPrivate *priv = atspi_device_legacy_get_instance_private 
(legacy_device);
   gboolean ret = priv->keyboard_grabbed;
-
+  guint modifiers;
+  
   set_virtual_modifier (legacy_device, event->hw_code,
                         event->type == (AtspiEventType)ATSPI_KEY_PRESS);
+
+  modifiers = event->modifiers | priv->virtual_mods_enabled;
+  if (modifiers & (1 << ATSPI_MODIFIER_NUMLOCK))
+    modifiers &= ~priv->numlock_physical_mask;
+
   ret |= atspi_device_notify_key (ATSPI_DEVICE (legacy_device),
                                   event->type == 
(AtspiEventType)ATSPI_KEY_PRESS,
                                   event->hw_code, event->id,
-                                  event->modifiers | 
priv->virtual_mods_enabled,
+                                  modifiers,
                                   event->event_string);
 
   g_boxed_free (ATSPI_TYPE_DEVICE_EVENT, event);
@@ -126,6 +133,9 @@
   AtspiDeviceLegacyPrivate *priv = atspi_device_legacy_get_instance_private 
(legacy_device);
   GSList *l;
 
+  if (modifier == (1 << ATSPI_MODIFIER_NUMLOCK))
+    return TRUE;
+
   for (l = priv->modifiers; l; l = l->next)
   {
     AtspiLegacyKeyModifier *entry = l->data;
@@ -269,6 +279,8 @@
   priv->display=XOpenDisplay("");
   if (priv->display)
     priv->window = DefaultRootWindow(priv->display);
+  priv->numlock_physical_mask = XkbKeysymToModifiers (priv->display,
+                                                     XK_Num_Lock);
 #endif
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/at-spi2-core-2.40.1/atspi/atspi-device-x11.c 
new/at-spi2-core-2.40.2/atspi/atspi-device-x11.c
--- old/at-spi2-core-2.40.1/atspi/atspi-device-x11.c    2021-05-01 
19:18:26.382456300 +0200
+++ new/at-spi2-core-2.40.2/atspi/atspi-device-x11.c    2021-06-05 
20:30:10.536779600 +0200
@@ -44,6 +44,7 @@
   GSList *key_grabs;
   guint virtual_mods_enabled;
   gboolean keyboard_grabbed;
+  unsigned int numlock_physical_mask;
 };
 
 GObjectClass *device_x11_parent_class;
@@ -176,7 +177,7 @@
 }
 
 static void
-grab_key (AtspiDeviceX11 *x11_device, int keycode, int modmask)
+grab_key_aux (AtspiDeviceX11 *x11_device, int keycode, int modmask)
 {
   AtspiDeviceX11Private *priv = atspi_device_x11_get_instance_private 
(x11_device);
   XIGrabModifiers xi_modifiers;
@@ -197,6 +198,22 @@
 }
 
 static void
+grab_key (AtspiDeviceX11 *x11_device, int keycode, int modmask)
+{
+  AtspiDeviceX11Private *priv = atspi_device_x11_get_instance_private 
(x11_device);
+
+  grab_key_aux (x11_device, keycode, modmask);
+  if (!(modmask & LockMask))
+    grab_key_aux (x11_device, keycode, modmask | LockMask);
+  if (!(modmask & priv->numlock_physical_mask))
+  {
+    grab_key_aux (x11_device, keycode, modmask | priv->numlock_physical_mask);
+    if (!(modmask & LockMask))
+      grab_key_aux (x11_device, keycode, modmask | LockMask | 
priv->numlock_physical_mask);
+  }
+}
+
+static void
 enable_key_grab (AtspiDeviceX11 *x11_device, AtspiX11KeyGrab *grab)
 {
   AtspiDeviceX11Private *priv = atspi_device_x11_get_instance_private 
(x11_device);
@@ -209,7 +226,7 @@
 }
 
 static void
-ungrab_key (AtspiDeviceX11 *x11_device, int keycode, int modmask)
+ungrab_key_aux (AtspiDeviceX11 *x11_device, int keycode, int modmask)
 {
   AtspiDeviceX11Private *priv = atspi_device_x11_get_instance_private 
(x11_device);
   XIGrabModifiers xi_modifiers;
@@ -221,6 +238,22 @@
 }
 
 static void
+ungrab_key (AtspiDeviceX11 *x11_device, int keycode, int modmask)
+{
+  AtspiDeviceX11Private *priv = atspi_device_x11_get_instance_private 
(x11_device);
+
+  ungrab_key_aux (x11_device, keycode, modmask);
+  if (!(modmask & LockMask))
+    ungrab_key_aux (x11_device, keycode, modmask | LockMask);
+  if (!(modmask & priv->numlock_physical_mask))
+  {
+    ungrab_key_aux (x11_device, keycode, modmask | 
priv->numlock_physical_mask);
+    if (!(modmask & LockMask))
+      ungrab_key_aux (x11_device, keycode, modmask | LockMask | 
priv->numlock_physical_mask);
+  }
+}
+
+static void
 disable_key_grab (AtspiDeviceX11 *x11_device, AtspiX11KeyGrab *grab)
 {
   AtspiDeviceX11Private *priv = atspi_device_x11_get_instance_private 
(x11_device);
@@ -290,6 +323,7 @@
   char text[10];
   KeySym keysym;
   XComposeStatus status;
+  guint modifiers;
  
   while (XPending (display))
   {
@@ -301,7 +335,13 @@
     case KeyPress:
     case KeyRelease:
       XLookupString(&xevent.xkey, text, sizeof (text), &keysym, &status);
-      atspi_device_notify_key (ATSPI_DEVICE (device), (xevent.type == 
KeyPress), xevent.xkey.keycode, keysym, xevent.xkey.state | 
priv->virtual_mods_enabled, text);
+      modifiers = xevent.xkey.state | priv->virtual_mods_enabled;
+      if (modifiers & priv->numlock_physical_mask)
+      {
+        modifiers |= (1 << ATSPI_MODIFIER_NUMLOCK);
+        modifiers &= ~priv->numlock_physical_mask;
+      }
+      atspi_device_notify_key (ATSPI_DEVICE (device), (xevent.type == 
KeyPress), xevent.xkey.keycode, keysym, modifiers, text);
       break;
     case GenericEvent:
       if (xevent.xcookie.extension == priv->xi_opcode)
@@ -326,8 +366,11 @@
           if (!priv->device_id)
             priv->device_id = xiDevEv->deviceid;
           set_virtual_modifier (device, xiRawEv->detail, xevent.xcookie.evtype 
== XI_KeyPress);
+          modifiers = keyevent.xkey.state | priv->virtual_mods_enabled;
+          if (modifiers & priv->numlock_physical_mask)
+            modifiers |= (1 << ATSPI_MODIFIER_NUMLOCK);
           if (xiDevEv->deviceid == priv->device_id)
-            atspi_device_notify_key (ATSPI_DEVICE (device), 
(xevent.xcookie.evtype == XI_KeyPress), xiRawEv->detail, keysym, 
keyevent.xkey.state, text);
+            atspi_device_notify_key (ATSPI_DEVICE (device), 
(xevent.xcookie.evtype == XI_KeyPress), xiRawEv->detail, keysym, modifiers, 
text);
           /* otherwise it's probably a duplicate event from a key grab */
           XFreeEventData (priv->display, &xevent.xcookie);
           break;
@@ -396,6 +439,9 @@
   AtspiDeviceX11Private *priv = atspi_device_x11_get_instance_private 
(x11_device);
   GSList *l;
 
+  if (modifier == (1 << ATSPI_MODIFIER_NUMLOCK))
+    return TRUE;
+
   for (l = priv->modifiers; l; l = l->next)
   {
     AtspiX11KeyModifier *entry = l->data;
@@ -534,6 +580,9 @@
       create_event_source (device);
     }
   }
+
+  priv->numlock_physical_mask = XkbKeysymToModifiers (priv->display,
+                                                     XK_Num_Lock);
 }
 
 static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/at-spi2-core-2.40.1/atspi/atspi-device.c 
new/at-spi2-core-2.40.2/atspi/atspi-device.c
--- old/at-spi2-core-2.40.1/atspi/atspi-device.c        2021-05-01 
19:18:26.382456300 +0200
+++ new/at-spi2-core-2.40.2/atspi/atspi-device.c        2021-06-05 
20:30:10.536779600 +0200
@@ -107,6 +107,19 @@
   return ATSPI_DEVICE (atspi_device_legacy_new ());
 }
 
+static gboolean
+key_matches_modifiers (guint key_mods, guint grab_mods)
+{
+  /* The presence or lack thereof of locking modifiers should make no
+     difference when testing, but other modifiers should match. If the
+     keypress has modifiers that (a) the grab does not check for and (b) are
+     not lock modifiers, then we reject the match. Alt + left arrow should not
+     match a grab on left arrow, for instance, but whether numlock is on or
+     off would be irrelevant. */
+  key_mods &= ~((1 << ATSPI_MODIFIER_SHIFTLOCK) | (1 << 
ATSPI_MODIFIER_NUMLOCK));
+  return (key_mods == grab_mods);
+}
+
 gboolean
 atspi_device_notify_key (AtspiDevice *device, gboolean pressed, int keycode, 
int keysym, gint state, gchar *text)
 {
@@ -123,8 +136,7 @@
   for (l = priv->keygrabs; l; l = l->next)
   {
     AtspiKeyGrab *grab = l->data;
-    //if (keycode == grab->keycode && (grab->modifiers & state) == 
grab->modifiers)
-    if (keycode == grab->keycode && grab->modifiers == state)
+    if (keycode == grab->keycode && key_matches_modifiers (state, 
grab->modifiers))
     {
       if (grab->callback)
         grab->callback (device, pressed, keycode, keysym, state, text, 
grab->callback_data);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/at-spi2-core-2.40.1/meson.build 
new/at-spi2-core-2.40.2/meson.build
--- old/at-spi2-core-2.40.1/meson.build 2021-05-01 19:18:26.402456500 +0200
+++ new/at-spi2-core-2.40.2/meson.build 2021-06-05 20:30:10.552779700 +0200
@@ -1,5 +1,5 @@
 project('at-spi2-core', 'c',
-        version: '2.40.1',
+        version: '2.40.2',
         license: 'LGPLv2.1+',
         default_options: [
           'buildtype=debugoptimized',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/at-spi2-core-2.40.1/registryd/de-marshaller.c 
new/at-spi2-core-2.40.2/registryd/de-marshaller.c
--- old/at-spi2-core-2.40.1/registryd/de-marshaller.c   2021-05-01 
19:18:26.414456600 +0200
+++ new/at-spi2-core-2.40.2/registryd/de-marshaller.c   2021-06-05 
20:30:10.560779800 +0200
@@ -70,7 +70,11 @@
     ptr = va_arg(args, void *);
     dbus_message_iter_append_basic(&iter_struct, type, ptr);
   }
-  if (!dbus_message_iter_close_container(iter, &iter_struct)) return FALSE;
+  if (!dbus_message_iter_close_container(iter, &iter_struct))
+  {
+    va_end(args);
+    return FALSE;
+  }
   va_end(args);
   return TRUE;
 }

Reply via email to