Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xwayland for openSUSE:Factory 
checked in at 2026-01-21 14:13:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xwayland (Old)
 and      /work/SRC/openSUSE:Factory/.xwayland.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xwayland"

Wed Jan 21 14:13:19 2026 rev:47 rq:1327962 version:24.1.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/xwayland/xwayland.changes        2025-10-29 
21:04:22.000829425 +0100
+++ /work/SRC/openSUSE:Factory/.xwayland.new.1928/xwayland.changes      
2026-01-21 14:13:33.425335977 +0100
@@ -1,0 +2,21 @@
+Sun Jan 18 20:29:00 UTC 2026 - Stefan Dirsch <[email protected]>
+
+- Update to version 24.1.9
+  * This release contains the fixes for the issues reported in
+    security advisory:
+    https://lists.x.org/archives/xorg-announce/2025-October/003635.html
+    + CVE-2025-62229
+    + CVE-2025-62230
+    + CVE-2025-62231
+  * Additionally, it contains a number of additional fixes:
+- supersedes the following patches
+  * 
bsc1251958_CVE-2025-62229_0001-present-Fix-use-after-free-in-present_create_notifie.patch
+  * 
bsc1251959_CVE-2025-62230_0001-xkb-Make-the-RT_XKBCLIENT-resource-private.patch
+  * 
bsc1251959_CVE-2025-62230_0002-xkb-Free-the-XKB-resource-when-freeing-XkbInterest.patch
+  * 
bsc1251960_CVE-2025-62231_0001-xkb-Prevent-overflow-in-XkbSetCompatMap.patch
+  * U_glamor_Fix_dual_blend_on_GLES3.patch
+  * U_randr_Do_not_leak_provider_property.patch
+  * U_xwayland_Dispatch_tablet_tool_tip_events.patch
+- adjusted U_xwayland_Dont_run_key_behaviors_and_actions.patch
+
+-------------------------------------------------------------------

Old:
----
  U_glamor_Fix_dual_blend_on_GLES3.patch
  U_randr_Do_not_leak_provider_property.patch
  U_xwayland_Dispatch_tablet_tool_tip_events.patch
  
bsc1251958_CVE-2025-62229_0001-present-Fix-use-after-free-in-present_create_notifie.patch
  
bsc1251959_CVE-2025-62230_0001-xkb-Make-the-RT_XKBCLIENT-resource-private.patch
  
bsc1251959_CVE-2025-62230_0002-xkb-Free-the-XKB-resource-when-freeing-XkbInterest.patch
  bsc1251960_CVE-2025-62231_0001-xkb-Prevent-overflow-in-XkbSetCompatMap.patch
  xwayland-24.1.8.tar.xz
  xwayland-24.1.8.tar.xz.sig

New:
----
  xwayland-24.1.9.tar.xz
  xwayland-24.1.9.tar.xz.sig

----------(Old B)----------
  Old:  * 
bsc1251960_CVE-2025-62231_0001-xkb-Prevent-overflow-in-XkbSetCompatMap.patch
  * U_glamor_Fix_dual_blend_on_GLES3.patch
  * U_randr_Do_not_leak_provider_property.patch
  Old:  * U_glamor_Fix_dual_blend_on_GLES3.patch
  * U_randr_Do_not_leak_provider_property.patch
  * U_xwayland_Dispatch_tablet_tool_tip_events.patch
  Old:  * U_randr_Do_not_leak_provider_property.patch
  * U_xwayland_Dispatch_tablet_tool_tip_events.patch
- adjusted U_xwayland_Dont_run_key_behaviors_and_actions.patch
  Old:- supersedes the following patches
  * 
bsc1251958_CVE-2025-62229_0001-present-Fix-use-after-free-in-present_create_notifie.patch
  * 
bsc1251959_CVE-2025-62230_0001-xkb-Make-the-RT_XKBCLIENT-resource-private.patch
  Old:  * 
bsc1251958_CVE-2025-62229_0001-present-Fix-use-after-free-in-present_create_notifie.patch
  * 
bsc1251959_CVE-2025-62230_0001-xkb-Make-the-RT_XKBCLIENT-resource-private.patch
  * 
bsc1251959_CVE-2025-62230_0002-xkb-Free-the-XKB-resource-when-freeing-XkbInterest.patch
  Old:  * 
bsc1251959_CVE-2025-62230_0001-xkb-Make-the-RT_XKBCLIENT-resource-private.patch
  * 
bsc1251959_CVE-2025-62230_0002-xkb-Free-the-XKB-resource-when-freeing-XkbInterest.patch
  * bsc1251960_CVE-2025-62231_0001-xkb-Prevent-overflow-in-XkbSetCompatMap.patch
  Old:  * 
bsc1251959_CVE-2025-62230_0002-xkb-Free-the-XKB-resource-when-freeing-XkbInterest.patch
  * bsc1251960_CVE-2025-62231_0001-xkb-Prevent-overflow-in-XkbSetCompatMap.patch
  * U_glamor_Fix_dual_blend_on_GLES3.patch
----------(Old E)----------

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

Other differences:
------------------
++++++ xwayland.spec ++++++
--- /var/tmp/diff_new_pack.rDfRR7/_old  2026-01-21 14:13:34.277371566 +0100
+++ /var/tmp/diff_new_pack.rDfRR7/_new  2026-01-21 14:13:34.281371733 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package xwayland
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,7 +27,7 @@
 %endif
 
 Name:           xwayland
-Version:        24.1.8
+Version:        24.1.9
 Release:        0
 URL:            http://xorg.freedesktop.org
 Summary:        Xwayland Xserver
@@ -36,14 +36,7 @@
 Source0:        %{url}/archive/individual/xserver/%{name}-%{version}.tar.xz
 Source1:        %{url}/archive/individual/xserver/%{name}-%{version}.tar.xz.sig
 Source2:        xwayland.keyring
-Patch0:         U_randr_Do_not_leak_provider_property.patch
-Patch1:         U_xwayland_Dispatch_tablet_tool_tip_events.patch
-Patch2:         U_glamor_Fix_dual_blend_on_GLES3.patch
 Patch3:         U_xwayland_Dont_run_key_behaviors_and_actions.patch
-Patch1251958:   
bsc1251958_CVE-2025-62229_0001-present-Fix-use-after-free-in-present_create_notifie.patch
-Patch1251959:   
bsc1251959_CVE-2025-62230_0001-xkb-Make-the-RT_XKBCLIENT-resource-private.patch
-Patch1251960:   
bsc1251959_CVE-2025-62230_0002-xkb-Free-the-XKB-resource-when-freeing-XkbInterest.patch
-Patch1251961:   
bsc1251960_CVE-2025-62231_0001-xkb-Prevent-overflow-in-XkbSetCompatMap.patch
 
 BuildRequires:  meson
 BuildRequires:  ninja

++++++ U_xwayland_Dont_run_key_behaviors_and_actions.patch ++++++
--- /var/tmp/diff_new_pack.rDfRR7/_old  2026-01-21 14:13:34.309372903 +0100
+++ /var/tmp/diff_new_pack.rDfRR7/_new  2026-01-21 14:13:34.313373070 +0100
@@ -46,11 +46,11 @@
  xkb/xkbPrKeyEv.c             | 2 +-
  4 files changed, 14 insertions(+), 6 deletions(-)
 
-diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
-index d5bce37835..51efdb5fb8 100644
---- a/hw/xwayland/xwayland-input.c
-+++ b/hw/xwayland/xwayland-input.c
-@@ -1284,11 +1284,12 @@ keyboard_handle_modifiers(void *data, struct 
wl_keyboard *keyboard,
+Index: xwayland-24.1.9/hw/xwayland/xwayland-input.c
+===================================================================
+--- xwayland-24.1.9.orig/hw/xwayland/xwayland-input.c
++++ xwayland-24.1.9/hw/xwayland/xwayland-input.c
+@@ -1284,11 +1284,12 @@ keyboard_handle_modifiers(void *data, st
          old_state = dev->key->xkbInfo->state;
          new_state = &dev->key->xkbInfo->state;
  
@@ -65,7 +65,7 @@
  
          XkbComputeDerivedState(dev->key->xkbInfo);
  
-@@ -1676,6 +1677,7 @@ add_device(struct xwl_seat *xwl_seat,
+@@ -1680,6 +1681,7 @@ add_device(struct xwl_seat *xwl_seat,
      dev->public.devicePrivate = xwl_seat;
      dev->type = SLAVE;
      dev->spriteInfo->spriteOwner = FALSE;
@@ -73,7 +73,7 @@
  
      return dev;
  }
-@@ -3597,6 +3599,7 @@ InitInput(int argc, char *argv[])
+@@ -3601,6 +3603,7 @@ InitInput(int argc, char *argv[])
  
      mieqInit();
  
@@ -81,10 +81,10 @@
      xwl_screen->input_registry = wl_display_get_registry(xwl_screen->display);
      wl_registry_add_listener(xwl_screen->input_registry, &input_listener,
                               xwl_screen);
-diff --git a/include/inputstr.h b/include/inputstr.h
-index 24dd48841e..269399e1d2 100644
---- a/include/inputstr.h
-+++ b/include/inputstr.h
+Index: xwayland-24.1.9/include/inputstr.h
+===================================================================
+--- xwayland-24.1.9.orig/include/inputstr.h
++++ xwayland-24.1.9/include/inputstr.h
 @@ -631,6 +631,8 @@ typedef struct _DeviceIntRec {
      DeviceSendEventsProc sendEventsProc;
  
@@ -94,11 +94,11 @@
  } DeviceIntRec;
  
  typedef struct {
-diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
-index 5e9a6b6d6e..8dd9d7da01 100644
---- a/xkb/xkbActions.c
-+++ b/xkb/xkbActions.c
-@@ -1368,9 +1368,12 @@ XkbHandleActions(DeviceIntPtr dev, DeviceIntPtr kbd, 
DeviceEvent *event)
+Index: xwayland-24.1.9/xkb/xkbActions.c
+===================================================================
+--- xwayland-24.1.9.orig/xkb/xkbActions.c
++++ xwayland-24.1.9/xkb/xkbActions.c
+@@ -1368,9 +1368,12 @@ XkbHandleActions(DeviceIntPtr dev, Devic
                    (event->type == ET_ButtonPress));
  
      if (pressEvent) {
@@ -114,11 +114,11 @@
              act = XkbGetButtonAction(kbd, dev, key);
              key |= BTN_ACT_FLAG;
          }
-diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c
-index d2c7e33f42..53a31b7272 100644
---- a/xkb/xkbPrKeyEv.c
-+++ b/xkb/xkbPrKeyEv.c
-@@ -68,7 +68,7 @@ XkbProcessKeyboardEvent(DeviceEvent *event, DeviceIntPtr 
keybd)
+Index: xwayland-24.1.9/xkb/xkbPrKeyEv.c
+===================================================================
+--- xwayland-24.1.9.orig/xkb/xkbPrKeyEv.c
++++ xwayland-24.1.9/xkb/xkbPrKeyEv.c
+@@ -68,7 +68,7 @@ XkbProcessKeyboardEvent(DeviceEvent *eve
      /* do anything to implement the behavior, but it *does* report that */
      /* key is hardwired */
  
@@ -127,7 +127,4 @@
          switch (behavior.type) {
          case XkbKB_Default:
              /* Neither of these should happen in practice, but ignore them
--- 
-GitLab
-
 

++++++ xwayland-24.1.8.tar.xz -> xwayland-24.1.9.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/COPYING new/xwayland-24.1.9/COPYING
--- old/xwayland-24.1.8/COPYING 2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/COPYING 2025-10-28 14:27:03.000000000 +0100
@@ -16,7 +16,7 @@
 Copyright © 2006-2008 Peter Hutterer
 Copyright © 2006 Adam Jackson
 Copyright © 2009-2010 NVIDIA Corporation
-Copyright © 1987, 2003-2006, 2008-2010 Oracle and/or its affiliates.
+Copyright © 1987, 2003-2006, 2008-2010, 2025 Oracle and/or its affiliates.
 Copyright © 1999 Keith Packard
 Copyright © 2007-2009 Red Hat, Inc.
 Copyright © 2005-2008 Daniel Stone
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xext/shm.c 
new/xwayland-24.1.9/Xext/shm.c
--- old/xwayland-24.1.8/Xext/shm.c      2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xext/shm.c      2025-10-28 14:27:03.000000000 +0100
@@ -210,7 +210,7 @@
     ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen);
 
     if (!screen_priv) {
-        screen_priv = calloc(1, sizeof(ShmScrPrivateRec));
+        screen_priv = XNFcallocarray(1, sizeof(ShmScrPrivateRec));
         screen_priv->CloseScreen = pScreen->CloseScreen;
         dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, screen_priv);
         pScreen->CloseScreen = ShmCloseScreen;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xext/sync.c 
new/xwayland-24.1.9/Xext/sync.c
--- old/xwayland-24.1.8/Xext/sync.c     2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xext/sync.c     2025-10-28 14:27:03.000000000 +0100
@@ -1005,7 +1005,7 @@
         psci = malloc(sizeof(SysCounterInfo));
         if (!psci) {
             FreeResource(pCounter->sync.id, RT_NONE);
-            return pCounter;
+            return NULL;
         }
         pCounter->pSysCounterInfo = psci;
         psci->pCounter = pCounter;
@@ -2658,9 +2658,11 @@
     int deviceid;
     CARD32 idle;
 
+    *pValue_return = 0;
     if (pCounter) {
         SyncCounter *counter = pCounter;
         IdleCounterPriv *priv = SysCounterGetPrivate(counter);
+        BUG_RETURN(priv == NULL);
         deviceid = priv->deviceid;
     }
     else
@@ -2674,6 +2676,7 @@
 {
     SyncCounter *counter = pCounter;
     IdleCounterPriv *priv = SysCounterGetPrivate(counter);
+    BUG_RETURN(priv == NULL);
     int64_t *less = priv->value_less;
     int64_t *greater = priv->value_greater;
     int64_t idle, old_idle;
@@ -2764,6 +2767,7 @@
 {
     SyncCounter *counter = pCounter;
     IdleCounterPriv *priv = SysCounterGetPrivate(counter);
+    BUG_RETURN(priv == NULL);
     int64_t *less = priv->value_less;
     int64_t *greater = priv->value_greater;
     int64_t idle;
@@ -2797,6 +2801,7 @@
 {
     SyncCounter *counter = pCounter;
     IdleCounterPriv *priv = SysCounterGetPrivate(counter);
+    BUG_RETURN(priv == NULL);
     int64_t *less = priv->value_less;
     int64_t *greater = priv->value_greater;
     Bool registered = (less || greater);
@@ -2834,8 +2839,10 @@
     if (idle_time_counter != NULL) {
         IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv));
 
-        priv->value_less = priv->value_greater = NULL;
-        priv->deviceid = deviceid;
+        if (priv) {
+            priv->value_less = priv->value_greater = NULL;
+            priv->deviceid = deviceid;
+        }
 
         idle_time_counter->pSysCounterInfo->private = priv;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xext/vidmode.c 
new/xwayland-24.1.9/Xext/vidmode.c
--- old/xwayland-24.1.8/Xext/vidmode.c  2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xext/vidmode.c  2025-10-28 14:27:03.000000000 +0100
@@ -808,6 +808,8 @@
         return BadValue;
 
     modetmp = VidModeCreateMode();
+    if (modetmp == NULL)
+        return BadAlloc;
     VidModeCopyMode(mode, modetmp);
 
     VidModeSetModeValue(modetmp, VIDMODE_H_DISPLAY, stuff->hdisplay);
@@ -951,6 +953,8 @@
         return BadValue;
 
     modetmp = VidModeCreateMode();
+    if (modetmp == NULL)
+        return BadAlloc;
     VidModeCopyMode(mode, modetmp);
 
     VidModeSetModeValue(modetmp, VIDMODE_H_DISPLAY, stuff->hdisplay);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xext/xres.c 
new/xwayland-24.1.9/Xext/xres.c
--- old/xwayland-24.1.8/Xext/xres.c     2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xext/xres.c     2025-10-28 14:27:03.000000000 +0100
@@ -226,6 +226,8 @@
     REQUEST_SIZE_MATCH(xXResQueryClientsReq);
 
     current_clients = xallocarray(currentMaxClients, sizeof(int));
+    if (current_clients == NULL)
+        return BadAlloc;
 
     num_clients = 0;
     for (i = 0; i < currentMaxClients; i++) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xext/xselinux_ext.c 
new/xwayland-24.1.9/Xext/xselinux_ext.c
--- old/xwayland-24.1.8/Xext/xselinux_ext.c     2025-06-18 18:00:16.000000000 
+0200
+++ new/xwayland-24.1.9/Xext/xselinux_ext.c     2025-10-28 14:27:03.000000000 
+0100
@@ -455,8 +455,10 @@
     count = 0;
     for (pSel = CurrentSelections; pSel; pSel = pSel->next)
         count++;
+    if (count == 0)
+        return SELinuxSendItemsToClient(client, NULL, 0, 0);
     items = calloc(count, sizeof(SELinuxListItemRec));
-    if (count && !items)
+    if (!items)
         return BadAlloc;
 
     /* Fill in the items and calculate size */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xext/xselinux_label.c 
new/xwayland-24.1.9/Xext/xselinux_label.c
--- old/xwayland-24.1.8/Xext/xselinux_label.c   2025-06-18 18:00:16.000000000 
+0200
+++ new/xwayland-24.1.9/Xext/xselinux_label.c   2025-10-28 14:27:03.000000000 
+0100
@@ -139,8 +139,12 @@
     rec = SELinuxArrayGet(&arr_atoms, atom);
     if (!rec) {
         rec = calloc(1, sizeof(SELinuxAtomRec));
-        if (!rec || !SELinuxArraySet(&arr_atoms, atom, rec))
+        if (!rec)
             return BadAlloc;
+        if (!SELinuxArraySet(&arr_atoms, atom, rec)) {
+            free(rec);
+            return BadAlloc;
+        }
     }
 
     if (prop) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xext/xtest.c 
new/xwayland-24.1.9/Xext/xtest.c
--- old/xwayland-24.1.8/Xext/xtest.c    2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xext/xtest.c    2025-10-28 14:27:03.000000000 +0100
@@ -346,6 +346,10 @@
             return BadAccess;
 
         dev = GetXTestDevice(dev);
+
+        /* This can only happen if we passed a slave to GetXTestDevice() */
+        if (!dev)
+            return BadAccess;
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xi/exevents.c 
new/xwayland-24.1.9/Xi/exevents.c
--- old/xwayland-24.1.8/Xi/exevents.c   2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xi/exevents.c   2025-10-28 14:27:03.000000000 +0100
@@ -1387,6 +1387,7 @@
             else
                 evtype = GetXI2Type(ev->any.type);
 
+            BUG_RETURN_VAL(!wOtherInputMasks(*win), FALSE);
             nt_list_for_each_entry(iclients,
                                    wOtherInputMasks(*win)->inputClients, next)
                 if (xi2mask_isset(iclients->xi2mask, dev, evtype))
@@ -1401,6 +1402,7 @@
             int xi_type = GetXIType(TouchGetPointerEventType(ev));
             Mask xi_filter = event_get_filter_from_type(dev, xi_type);
 
+            BUG_RETURN_VAL(!wOtherInputMasks(*win), FALSE);
             nt_list_for_each_entry(iclients,
                                    wOtherInputMasks(*win)->inputClients, next)
                 if (iclients->mask[dev->id] & xi_filter)
@@ -2290,6 +2292,7 @@
            listener->type == GESTURE_LISTENER_REGULAR */
         evtype = GetXI2Type(ev->any.type);
 
+        BUG_RETURN_VAL(!wOtherInputMasks(*win), FALSE);
         nt_list_for_each_entry(iclients, wOtherInputMasks(*win)->inputClients, 
next)
             if (xi2mask_isset(iclients->xi2mask, dev, evtype))
                 break;
@@ -3234,13 +3237,18 @@
             inputMasks->dontPropagateMask[maskndx] = mask;
     }
     else {
-        if (!inputMasks)
-            AddExtensionClient(pWin, client, 0, 0);
-        inputMasks = wOtherInputMasks(pWin);
+        if (!inputMasks) {
+            int ret = AddExtensionClient(pWin, client, 0, 0);
+
+            if (ret != Success)
+                return ret;
+            inputMasks = wOtherInputMasks(pWin);
+            BUG_RETURN_VAL(!inputMasks, BadAlloc);
+        }
         inputMasks->dontPropagateMask[maskndx] = mask;
     }
     RecalculateDeviceDeliverableEvents(pWin);
-    if (ShouldFreeInputMasks(pWin, FALSE))
+    if (inputMasks && ShouldFreeInputMasks(pWin, FALSE))
         FreeResource(inputMasks->inputClients->resource, RT_NONE);
     return Success;
 }
@@ -3335,6 +3343,7 @@
     if (len && !others) {
         if (AddExtensionClient(win, client, 0, 0) != Success)
             return BadAlloc;
+        BUG_RETURN_VAL(!wOtherInputMasks(win), BadAlloc);
         others = wOtherInputMasks(win)->inputClients;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xi/getfctl.c 
new/xwayland-24.1.9/Xi/getfctl.c
--- old/xwayland-24.1.8/Xi/getfctl.c    2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xi/getfctl.c    2025-10-28 14:27:03.000000000 +0100
@@ -97,6 +97,7 @@
     k2->pitch = k->ctrl.bell_pitch;
     k2->duration = k->ctrl.bell_duration;
     k2->led_mask = k->ctrl.leds;
+    k2->led_values = k->ctrl.leds;
     k2->global_auto_repeat = k->ctrl.autoRepeat;
     for (i = 0; i < 32; i++)
         k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xi/getprop.c 
new/xwayland-24.1.9/Xi/getprop.c
--- old/xwayland-24.1.8/Xi/getprop.c    2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xi/getprop.c    2025-10-28 14:27:03.000000000 +0100
@@ -119,6 +119,8 @@
         if (count) {
             rep.count = count;
             buf = xallocarray(rep.count, sizeof(XEventClass));
+            if (buf == NULL)
+                return BadAlloc;
             rep.length = bytes_to_int32(rep.count * sizeof(XEventClass));
 
             tbuf = buf;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xi/listdev.c 
new/xwayland-24.1.9/Xi/listdev.c
--- old/xwayland-24.1.8/Xi/listdev.c    2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xi/listdev.c    2025-10-28 14:27:03.000000000 +0100
@@ -377,6 +377,10 @@
     /* allocate space for reply */
     total_length = numdevs * sizeof(xDeviceInfo) + size + namesize;
     devbuf = (char *) calloc(1, total_length);
+    if (!devbuf) {
+        free(skip);
+        return BadAlloc;
+    }
     classbuf = devbuf + (numdevs * sizeof(xDeviceInfo));
     namebuf = classbuf + size;
     savbuf = devbuf;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/Xi/xibarriers.c 
new/xwayland-24.1.9/Xi/xibarriers.c
--- old/xwayland-24.1.8/Xi/xibarriers.c 2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/Xi/xibarriers.c 2025-10-28 14:27:03.000000000 +0100
@@ -726,6 +726,8 @@
 
 
     pbd = AllocBarrierDevice();
+    if (!pbd)
+        return;
     pbd->deviceid = *deviceid;
 
     input_lock();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/dix/dixfonts.c 
new/xwayland-24.1.9/dix/dixfonts.c
--- old/xwayland-24.1.8/dix/dixfonts.c  2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/dix/dixfonts.c  2025-10-28 14:27:03.000000000 +0100
@@ -929,9 +929,8 @@
                 c->haveSaved = TRUE;
                 c->savedNumFonts = numFonts;
                 free(c->savedName);
-                c->savedName = malloc(namelen + 1);
-                if (c->savedName)
-                    memcpy(c->savedName, name, namelen + 1);
+                c->savedName = XNFalloc(namelen + 1);
+                memcpy(c->savedName, name, namelen + 1);
                 aliascount = 20;
             }
             memmove(c->current.pattern, name, namelen);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/dix/enterleave.c 
new/xwayland-24.1.9/dix/enterleave.c
--- old/xwayland-24.1.8/dix/enterleave.c        2025-06-18 18:00:16.000000000 
+0200
+++ new/xwayland-24.1.9/dix/enterleave.c        2025-10-28 14:27:03.000000000 
+0100
@@ -783,6 +783,7 @@
     len = sizeof(xXIFocusInEvent) + btlen * 4;
 
     xi2event = calloc(1, len);
+    BUG_RETURN(xi2event == NULL);
     xi2event->type = GenericEvent;
     xi2event->extension = IReqCode;
     xi2event->evtype = type;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/dix/gestures.c 
new/xwayland-24.1.9/dix/gestures.c
--- old/xwayland-24.1.8/dix/gestures.c  2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/dix/gestures.c  2025-10-28 14:27:03.000000000 +0100
@@ -237,6 +237,7 @@
         return;
 
     inputMasks = wOtherInputMasks(win);
+    BUG_RETURN(!inputMasks);
 
     if (mask & EVENT_XI2_MASK) {
         nt_list_for_each_entry(iclients, inputMasks->inputClients, next) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/dix/property.c 
new/xwayland-24.1.9/dix/property.c
--- old/xwayland-24.1.8/dix/property.c  2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/dix/property.c  2025-10-28 14:27:03.000000000 +0100
@@ -616,8 +616,8 @@
     if (numProps) {
         client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
         WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
-        free(pAtoms);
     }
+    free(pAtoms);
     return Success;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/dix/swaprep.c 
new/xwayland-24.1.9/dix/swaprep.c
--- old/xwayland-24.1.8/dix/swaprep.c   2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/dix/swaprep.c   2025-10-28 14:27:03.000000000 +0100
@@ -48,6 +48,8 @@
 #include <dix-config.h>
 #endif
 
+#include <assert.h>
+
 #include <X11/X.h>
 #include <X11/Xproto.h>
 #include "misc.h"
@@ -95,6 +97,8 @@
     CARD32 *from, *to, *fromLast, *toLast;
     CARD32 tmpbuf[1];
 
+    assert((bufsize % sizeof(CARD32)) == 0);
+
     /* Allocate as big a buffer as we can... */
     while (!(pbufT = malloc(bufsize))) {
         bufsize >>= 1;
@@ -142,6 +146,8 @@
     short *from, *to, *fromLast, *toLast;
     short tmpbuf[2];
 
+    assert((bufsize % sizeof(short)) == 0);
+
     /* Allocate as big a buffer as we can... */
     while (!(pbufT = malloc(bufsize))) {
         bufsize >>= 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/dix/touch.c 
new/xwayland-24.1.9/dix/touch.c
--- old/xwayland-24.1.8/dix/touch.c     2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/dix/touch.c     2025-10-28 14:27:03.000000000 +0100
@@ -762,6 +762,8 @@
     inputMasks = wOtherInputMasks(win);
 
     if (mask & EVENT_XI2_MASK) {
+        BUG_RETURN_VAL(!inputMasks, FALSE);
+
         nt_list_for_each_entry(iclients, inputMasks->inputClients, next) {
             if (!xi2mask_isset(iclients->xi2mask, dev, evtype))
                 continue;
@@ -779,6 +781,8 @@
         int xitype = GetXIType(TouchGetPointerEventType(ev));
         Mask xi_filter = event_get_filter_from_type(dev, xitype);
 
+        BUG_RETURN_VAL(!inputMasks, FALSE);
+
         nt_list_for_each_entry(iclients, inputMasks->inputClients, next) {
             if (!(iclients->mask[dev->id] & xi_filter))
                 continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/dix/window.c 
new/xwayland-24.1.9/dix/window.c
--- old/xwayland-24.1.8/dix/window.c    2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/dix/window.c    2025-10-28 14:27:03.000000000 +0100
@@ -3492,6 +3492,8 @@
             return Success;
 
         pNewNode = malloc(sizeof(DevCursNodeRec));
+        if (!pNewNode)
+            return BadAlloc;
         pNewNode->dev = pDev;
         pNewNode->next = pWin->optional->deviceCursors;
         pWin->optional->deviceCursors = pNewNode;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/glamor/glamor_composite_glyphs.c 
new/xwayland-24.1.9/glamor/glamor_composite_glyphs.c
--- old/xwayland-24.1.8/glamor/glamor_composite_glyphs.c        2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/glamor/glamor_composite_glyphs.c        2025-10-28 
14:27:03.000000000 +0100
@@ -178,6 +178,24 @@
     return TRUE;
 }
 
+static const glamor_facet glamor_facet_composite_glyphs_es300 = {
+    .name = "composite_glyphs",
+    .version = 130,
+    .fs_extensions = ("#extension GL_EXT_blend_func_extended : enable\n"),
+    .vs_vars = ("in vec4 primitive;\n"
+                "in vec2 source;\n"
+                "out vec2 glyph_pos;\n"),
+    .vs_exec = ("       vec2 pos = primitive.zw * vec2(gl_VertexID&1, 
(gl_VertexID&2)>>1);\n"
+                GLAMOR_POS(gl_Position, (primitive.xy + pos))
+                "       glyph_pos = (source + pos) * ATLAS_DIM_INV;\n"),
+    .fs_vars = ("in vec2 glyph_pos;\n"
+                "out vec4 color0;\n"
+                "out vec4 color1;\n"),
+    .fs_exec = ("       vec4 mask = texture(atlas, glyph_pos);\n"),
+    .source_name = "source",
+    .locations = glamor_program_location_atlas,
+};
+
 static const glamor_facet glamor_facet_composite_glyphs_130 = {
     .name = "composite_glyphs",
     .version = 130,
@@ -454,7 +472,9 @@
                         if (glamor_glsl_has_ints(glamor_priv))
                             prog = glamor_setup_program_render(op, src, 
glyph_pict, dst,
                                                                glyphs_program,
-                                                               
&glamor_facet_composite_glyphs_130,
+                                                               
glamor_priv->is_gles ?
+                                                                   
&glamor_facet_composite_glyphs_es300 :
+                                                                   
&glamor_facet_composite_glyphs_130,
                                                                
glamor_priv->glyph_defines);
                         else
                             prog = glamor_setup_program_render(op, src, 
glyph_pict, dst,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/hw/xwayland/xwayland-input.c 
new/xwayland-24.1.9/hw/xwayland/xwayland-input.c
--- old/xwayland-24.1.8/hw/xwayland/xwayland-input.c    2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/hw/xwayland/xwayland-input.c    2025-10-28 
14:27:03.000000000 +0100
@@ -1599,9 +1599,13 @@
     WindowPtr window = resource;
     WindowPtr *toplevel = user_data;
 
-    /* Pick the first realized toplevel we find */
-    if (*toplevel == NullWindow && window->realized && 
xwl_window_is_toplevel(window))
-        *toplevel = window;
+    while (*toplevel == NullWindow && window) {
+        /* Pick the first realized toplevel we find */
+        if (window->realized && xwl_window_is_toplevel(window))
+            *toplevel = window;
+        else
+            window = window->parent;
+    }
 }
 
 static WindowPtr
@@ -2183,22 +2187,17 @@
 {
     struct xwl_tablet_tool *xwl_tablet_tool = data;
     struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-    ValuatorMask mask;
 
+    xwl_tablet_tool->tip = TRUE;
     xwl_seat->xwl_screen->serial = serial;
-
-    valuator_mask_zero(&mask);
-    QueuePointerEvents(xwl_tablet_tool->xdevice, ButtonPress, 1, 0, &mask);
 }
 
 static void
 tablet_tool_up(void *data, struct zwp_tablet_tool_v2 *tool)
 {
     struct xwl_tablet_tool *xwl_tablet_tool = data;
-    ValuatorMask mask;
 
-    valuator_mask_zero(&mask);
-    QueuePointerEvents(xwl_tablet_tool->xdevice, ButtonRelease, 1, 0, &mask);
+    xwl_tablet_tool->tip = FALSE;
 }
 
 static void
@@ -2321,7 +2320,7 @@
 {
     struct xwl_tablet_tool *xwl_tablet_tool = data;
     struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-    uint32_t *mask = &xwl_tablet_tool->buttons_now;
+    uint32_t *mask = &xwl_tablet_tool->buttons;
     int xbtn = 0;
 
     /* BTN_0 .. BTN_9 */
@@ -2386,7 +2385,7 @@
 {
     struct xwl_tablet_tool *xwl_tablet_tool = data;
     ValuatorMask mask;
-    uint32_t released, pressed, diff;
+    uint32_t effective_buttons, released, pressed, diff;
     int button;
 
     valuator_mask_zero(&mask);
@@ -2402,9 +2401,14 @@
 
     valuator_mask_zero(&mask);
 
-    diff = xwl_tablet_tool->buttons_prev ^ xwl_tablet_tool->buttons_now;
-    released = diff & ~xwl_tablet_tool->buttons_now;
-    pressed = diff & xwl_tablet_tool->buttons_now;
+    effective_buttons = xwl_tablet_tool->buttons;
+    if (xwl_tablet_tool->tip) {
+        SetBit(&effective_buttons, 0);
+    }
+
+    diff = effective_buttons ^ xwl_tablet_tool->effective_buttons;
+    released = diff & ~effective_buttons;
+    pressed = diff & effective_buttons;
 
     button = 1;
     while (released) {
@@ -2424,7 +2428,7 @@
         pressed >>= 1;
     }
 
-    xwl_tablet_tool->buttons_prev = xwl_tablet_tool->buttons_now;
+    xwl_tablet_tool->effective_buttons = effective_buttons;
 
     while (xwl_tablet_tool->wheel_clicks) {
             if (xwl_tablet_tool->wheel_clicks < 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/hw/xwayland/xwayland-input.h 
new/xwayland-24.1.9/hw/xwayland/xwayland-input.h
--- old/xwayland-24.1.8/hw/xwayland/xwayland-input.h    2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/hw/xwayland/xwayland-input.h    2025-10-28 
14:27:03.000000000 +0100
@@ -148,8 +148,9 @@
     double rotation;
     double slider;
 
-    uint32_t buttons_now,
-             buttons_prev;
+    uint32_t buttons;
+    Bool tip;
+    uint32_t effective_buttons;
 
     int32_t wheel_clicks;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/hw/xwayland/xwayland-output.c 
new/xwayland-24.1.9/hw/xwayland/xwayland-output.c
--- old/xwayland-24.1.8/hw/xwayland/xwayland-output.c   2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/hw/xwayland/xwayland-output.c   2025-10-28 
14:27:03.000000000 +0100
@@ -718,7 +718,7 @@
     /* And leases' names as well */
     xorg_list_for_each_entry(lease, &pScrPriv->leases, list) {
         for (i = 0; i < lease->numOutputs; i++) {
-            if (!strcmp(name, pScrPriv->outputs[i]->name)) {
+            if (!strcmp(name, lease->outputs[i]->name)) {
                 ErrorF("A lease output named '%s' already exists", name);
                 return;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/hw/xwayland/xwayland-screen.c 
new/xwayland-24.1.9/hw/xwayland/xwayland-screen.c
--- old/xwayland-24.1.8/hw/xwayland/xwayland-screen.c   2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/hw/xwayland/xwayland-screen.c   2025-10-28 
14:27:03.000000000 +0100
@@ -485,7 +485,7 @@
     struct xwl_screen *xwl_screen = data;
 
     if (strcmp(interface, wl_compositor_interface.name) == 0) {
-        uint32_t request_version = 1;
+        uint32_t request_version = WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION;
 
         if (version >= WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION)
             request_version = WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION;
@@ -1142,6 +1142,9 @@
     xwl_screen->ConfigNotify = pScreen->ConfigNotify;
     pScreen->ConfigNotify = xwl_config_notify;
 
+    xwl_screen->ReparentWindow = pScreen->ReparentWindow;
+    pScreen->ReparentWindow = xwl_reparent_window;
+
     xwl_screen->ResizeWindow = pScreen->ResizeWindow;
     pScreen->ResizeWindow = xwl_resize_window;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/hw/xwayland/xwayland-screen.h 
new/xwayland-24.1.9/hw/xwayland/xwayland-screen.h
--- old/xwayland-24.1.8/hw/xwayland/xwayland-screen.h   2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/hw/xwayland/xwayland-screen.h   2025-10-28 
14:27:03.000000000 +0100
@@ -78,6 +78,7 @@
     XYToWindowProcPtr XYToWindow;
     SetWindowPixmapProcPtr SetWindowPixmap;
     ChangeWindowAttributesProcPtr ChangeWindowAttributes;
+    ReparentWindowProcPtr ReparentWindow;
     ResizeWindowProcPtr ResizeWindow;
     MoveWindowProcPtr MoveWindow;
     SourceValidateProcPtr SourceValidate;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/hw/xwayland/xwayland-window.c 
new/xwayland-24.1.9/hw/xwayland/xwayland-window.c
--- old/xwayland-24.1.8/hw/xwayland/xwayland-window.c   2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/hw/xwayland/xwayland-window.c   2025-10-28 
14:27:03.000000000 +0100
@@ -67,6 +67,7 @@
 #define FRACTIONAL_SCALE_DENOMINATOR 120
 
 static DevPrivateKeyRec xwl_window_private_key;
+static DevPrivateKeyRec xwl_wm_window_private_key;
 static DevPrivateKeyRec xwl_damage_private_key;
 static const char *xwl_surface_tag = "xwl-surface";
 
@@ -393,6 +394,7 @@
     xwl_window->viewport = NULL;
     xwl_window->viewport_scale_x = 1.0;
     xwl_window->viewport_scale_y = 1.0;
+    xwl_window_set_input_region(xwl_window, wInputShape(xwl_window->toplevel));
 }
 
 /* Enable the viewport for fractional scale support with Xwayland rootful.
@@ -429,6 +431,7 @@
 
     xwl_window->viewport_scale_x = scale;
     xwl_window->viewport_scale_y = scale;
+    xwl_window_set_input_region(xwl_window, wInputShape(xwl_window->toplevel));
 }
 
 /* Enable the viewport for Xwayland rootful fullscreen, to match the XRandR
@@ -464,14 +467,39 @@
 
     xwl_window->viewport_scale_x = (float) width / xwl_output->width;
     xwl_window->viewport_scale_y = (float) height / xwl_output->height;
+    xwl_window_set_input_region(xwl_window, wInputShape(xwl_window->toplevel));
 }
 
 static Bool
 window_is_wm_window(WindowPtr window)
 {
     struct xwl_screen *xwl_screen = xwl_screen_get(window->drawable.pScreen);
+    Bool *is_wm_window;
 
-    return CLIENT_ID(window->drawable.id) == xwl_screen->wm_client_id;
+    if (CLIENT_ID(window->drawable.id) == xwl_screen->wm_client_id)
+        return TRUE;
+
+    is_wm_window = dixLookupPrivate(&window->devPrivates, 
&xwl_wm_window_private_key);
+    return *is_wm_window;
+}
+
+static WindowPtr
+get_single_input_output_child(WindowPtr window)
+{
+    WindowPtr iter, input_output_child = NULL;
+
+    for (iter = window->firstChild; iter; iter = iter->nextSib) {
+        if (iter->drawable.class != InputOutput)
+            continue;
+
+        /* We're looking for a single InputOutput child, bail if there are 
multiple */
+        if (input_output_child)
+            return NULL;
+
+        input_output_child = iter;
+    }
+
+    return input_output_child;
 }
 
 static WindowPtr
@@ -482,14 +510,10 @@
     /* If the toplevel window is owned by the window-manager, then the
      * actual client toplevel window has been reparented to some window-manager
      * decoration/wrapper windows. In that case recurse by checking the client
-     * of the first *and only* child of the decoration/wrapper window.
+     * of the only InputOutput child of the decoration/wrapper window.
      */
-    while (window_is_wm_window(window)) {
-        if (!window->firstChild || window->firstChild != window->lastChild)
-            return NULL; /* Should never happen, skip resolution emulation */
-
-        window = window->firstChild;
-    }
+    while (window && window_is_wm_window(window))
+        window = get_single_input_output_child(window);
 
     return window;
 }
@@ -1840,6 +1864,31 @@
 }
 
 void
+xwl_reparent_window(WindowPtr window, WindowPtr prior_parent)
+{
+    ScreenPtr screen = window->drawable.pScreen;
+    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
+    WindowPtr parent = window->parent;
+    Bool *is_wm_window;
+
+    if (xwl_screen->ReparentWindow) {
+        screen->ReparentWindow = xwl_screen->ReparentWindow;
+        screen->ReparentWindow(window, prior_parent);
+        xwl_screen->ReparentWindow = screen->ReparentWindow;
+        screen->ReparentWindow = xwl_reparent_window;
+    }
+
+    if (!parent->parent ||
+        GetCurrentClient()->index != xwl_screen->wm_client_id)
+        return;
+
+    /* If the WM client reparents a window, mark the new parent as a WM window 
*/
+    is_wm_window = dixLookupPrivate(&parent->devPrivates,
+                                    &xwl_wm_window_private_key);
+    *is_wm_window = TRUE;
+}
+
+void
 xwl_resize_window(WindowPtr window,
                   int x, int y,
                   unsigned int width, unsigned int height,
@@ -2037,12 +2086,20 @@
     region = wl_compositor_create_region(xwl_window->xwl_screen->compositor);
     box = RegionRects(input_shape);
 
-    for (i = 0; i < RegionNumRects(input_shape); ++i, ++box) {
-        wl_region_add(region,
-                      box->x1,
-                      box->y1,
-                      box->x2 - box->x1,
-                      box->y2 - box->y1);
+    for (i = 0; i < RegionNumRects(input_shape); ++i) {
+        BoxRec b = box[i];
+
+        if (xwl_window->viewport_scale_x != 1.0f) {
+            b.x1 = floorf(b.x1 / xwl_window->viewport_scale_x);
+            b.x2 = ceilf(b.x2 / xwl_window->viewport_scale_x);
+        }
+
+        if (xwl_window->viewport_scale_y != 1.0f) {
+            b.y1 = floorf(b.y1 / xwl_window->viewport_scale_y);
+            b.y2 = ceilf(b.y2 / xwl_window->viewport_scale_y);
+        }
+
+        wl_region_add(region, b.x1, b.y1, b.x2 - b.x1, b.y2 - b.y1);
     }
 
     wl_surface_set_input_region(xwl_window->surface, region);
@@ -2055,6 +2112,10 @@
     if (!dixRegisterPrivateKey(&xwl_window_private_key, PRIVATE_WINDOW, 0))
         return FALSE;
 
+    if (!dixRegisterPrivateKey(&xwl_wm_window_private_key, PRIVATE_WINDOW,
+                               sizeof(Bool)))
+        return FALSE;
+
     if (!dixRegisterPrivateKey(&xwl_damage_private_key, PRIVATE_WINDOW, 0))
         return FALSE;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/hw/xwayland/xwayland-window.h 
new/xwayland-24.1.9/hw/xwayland/xwayland-window.h
--- old/xwayland-24.1.8/hw/xwayland/xwayland-window.h   2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/hw/xwayland/xwayland-window.h   2025-10-28 
14:27:03.000000000 +0100
@@ -135,6 +135,7 @@
                       int x, int y,
                       int width, int height, int bw,
                       WindowPtr sib);
+void xwl_reparent_window(WindowPtr window, WindowPtr prior_parent);
 void xwl_resize_window(WindowPtr window,
                        int x, int y,
                        unsigned int width, unsigned int height,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/include/xkbsrv.h 
new/xwayland-24.1.9/include/xkbsrv.h
--- old/xwayland-24.1.8/include/xkbsrv.h        2025-06-18 18:00:16.000000000 
+0200
+++ new/xwayland-24.1.9/include/xkbsrv.h        2025-10-28 14:27:03.000000000 
+0100
@@ -58,6 +58,8 @@
 #include "inputstr.h"
 #include "events.h"
 
+extern RESTYPE RT_XKBCLIENT;
+
 typedef struct _XkbInterest {
     DeviceIntPtr dev;
     ClientPtr client;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/meson.build 
new/xwayland-24.1.9/meson.build
--- old/xwayland-24.1.8/meson.build     2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/meson.build     2025-10-28 14:27:03.000000000 +0100
@@ -3,10 +3,10 @@
             'buildtype=debugoptimized',
             'c_std=gnu99',
         ],
-        version: '24.1.8',
+        version: '24.1.9',
         meson_version: '>= 0.56.0',
 )
-release_date = '2025-06-18'
+release_date = '2025-10-28'
 
 add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
 cc = meson.get_compiler('c')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/miext/sync/meson.build 
new/xwayland-24.1.9/miext/sync/meson.build
--- old/xwayland-24.1.8/miext/sync/meson.build  2025-06-18 18:00:16.000000000 
+0200
+++ new/xwayland-24.1.9/miext/sync/meson.build  2025-10-28 14:27:03.000000000 
+0100
@@ -10,7 +10,7 @@
     'misyncstr.h',
 ]
 
-if build_dri3 or build_xwayland
+if build_dri3 or build_xwayland or xshmfence_dep.found()
     srcs_miext_sync += 'misyncshm.c'
 endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/os/log.c new/xwayland-24.1.9/os/log.c
--- old/xwayland-24.1.8/os/log.c        2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/os/log.c        2025-10-28 14:27:03.000000000 +0100
@@ -847,7 +847,7 @@
     if (size - len == 1)
         buf[len - 1] = '\n';
 
-    newline = (buf[len - 1] == '\n');
+    newline = (len > 0 && buf[len - 1] == '\n');
     LogSWrite(verb, buf, len, newline);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/os/xsha1.c 
new/xwayland-24.1.9/os/xsha1.c
--- old/xwayland-24.1.8/os/xsha1.c      2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/os/xsha1.c      2025-10-28 14:27:03.000000000 +0100
@@ -1,7 +1,10 @@
-/* Copyright © 2007 Carl Worth
+/* SPDX-License-Identifier: MIT
+ *
+ * Copyright © 2007 Carl Worth
  * Copyright © 2009 Jeremy Huddleston, Julien Cristau, and Matthieu Herrb
  * Copyright © 2009-2010 Mikhail Gusarov
  * Copyright © 2012 Yaakov Selkowitz and Keith Packard
+ * Copyright (c) 2025, Oracle and/or its affiliates.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -13,7 +16,7 @@
  * 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
@@ -256,13 +259,43 @@
 
 #else                           /* Use OpenSSL's libcrypto */
 
+#include <openssl/opensslv.h>
+#if OPENSSL_VERSION_MAJOR >= 3
+#define USE_EVP
+#endif
+
+#ifdef USE_EVP
+#include <openssl/evp.h>
+#else
 #include <stddef.h>             /* buggy openssl/sha.h wants size_t */
 #include <openssl/sha.h>
+#endif
+
+#ifdef USE_EVP
+static EVP_MD *sha1 = NULL;
+#endif
 
 void *
 x_sha1_init(void)
 {
     int ret;
+#ifdef USE_EVP
+    EVP_MD_CTX *ctx;
+
+    if (sha1 == NULL) {
+        sha1 = EVP_MD_fetch(NULL, "SHA1", NULL);
+        if (sha1 == NULL)
+            return NULL;
+    }
+    ctx = EVP_MD_CTX_new();
+    if (ctx == NULL)
+        return NULL;
+    ret = EVP_DigestInit_ex2(ctx, sha1, NULL);
+    if (!ret) {
+        EVP_MD_CTX_free(ctx);
+        return NULL;
+    }
+#else
     SHA_CTX *ctx = malloc(sizeof(*ctx));
 
     if (!ctx)
@@ -272,6 +305,7 @@
         free(ctx);
         return NULL;
     }
+#endif
     return ctx;
 }
 
@@ -279,11 +313,19 @@
 x_sha1_update(void *ctx, void *data, int size)
 {
     int ret;
+#ifdef USE_EVP
+    EVP_MD_CTX *sha_ctx = ctx;
+
+    ret = EVP_DigestUpdate(sha_ctx, data, size);
+    if (!ret)
+        EVP_MD_CTX_free(sha_ctx);
+#else
     SHA_CTX *sha_ctx = ctx;
 
     ret = SHA1_Update(sha_ctx, data, size);
     if (!ret)
         free(sha_ctx);
+#endif
     return ret;
 }
 
@@ -291,10 +333,18 @@
 x_sha1_final(void *ctx, unsigned char result[20])
 {
     int ret;
+#ifdef USE_EVP
+    EVP_MD_CTX *sha_ctx = ctx;
+    unsigned int result_len = 20; /* size of result buffer */
+
+    ret = EVP_DigestFinal_ex(sha_ctx, result, &result_len);
+    EVP_MD_CTX_free(sha_ctx);
+#else
     SHA_CTX *sha_ctx = ctx;
 
     ret = SHA1_Final(result, sha_ctx);
     free(sha_ctx);
+#endif
     return ret;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/present/present_notify.c 
new/xwayland-24.1.9/present/present_notify.c
--- old/xwayland-24.1.8/present/present_notify.c        2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/present/present_notify.c        2025-10-28 
14:27:03.000000000 +0100
@@ -90,7 +90,7 @@
         if (status != Success)
             goto bail;
 
-        added = i;
+        added++;
     }
     return Success;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/randr/rrproviderproperty.c 
new/xwayland-24.1.9/randr/rrproviderproperty.c
--- old/xwayland-24.1.8/randr/rrproviderproperty.c      2025-06-18 
18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/randr/rrproviderproperty.c      2025-10-28 
14:27:03.000000000 +0100
@@ -179,8 +179,11 @@
 
     if (mode == PropModeReplace || len > 0) {
         void *new_data = NULL, *old_data = NULL;
-        if (total_len > MAXINT / size_in_bytes)
+        if (total_len > MAXINT / size_in_bytes) {
+            if (add)
+                RRDestroyProviderProperty(prop);
             return BadValue;
+        }
         total_size = total_len * size_in_bytes;
         new_value.data = (void *) malloc(total_size);
         if (!new_value.data && total_size) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/xkb/xkb.c 
new/xwayland-24.1.9/xkb/xkb.c
--- old/xwayland-24.1.8/xkb/xkb.c       2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/xkb/xkb.c       2025-10-28 14:27:03.000000000 +0100
@@ -50,7 +50,7 @@
 CARD32 xkbDebugFlags = 0;
 static CARD32 xkbDebugCtrls = 0;
 
-static RESTYPE RT_XKBCLIENT;
+RESTYPE RT_XKBCLIENT = 0;
 
 /***====================================================================***/
 
@@ -2990,6 +2990,8 @@
         XkbSymInterpretPtr sym;
         unsigned int skipped = 0;
 
+        if ((unsigned) (req->firstSI + req->nSI) > USHRT_MAX)
+            return BadValue;
         if ((unsigned) (req->firstSI + req->nSI) > compat->size_si) {
             compat->num_si = compat->size_si = req->firstSI + req->nSI;
             compat->sym_interpret = reallocarray(compat->sym_interpret,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-24.1.8/xkb/xkbEvents.c 
new/xwayland-24.1.9/xkb/xkbEvents.c
--- old/xwayland-24.1.8/xkb/xkbEvents.c 2025-06-18 18:00:16.000000000 +0200
+++ new/xwayland-24.1.9/xkb/xkbEvents.c 2025-10-28 14:27:03.000000000 +0100
@@ -1055,6 +1055,7 @@
             autoCtrls = interest->autoCtrls;
             autoValues = interest->autoCtrlValues;
             client = interest->client;
+            FreeResource(interest->resource, RT_XKBCLIENT);
             free(interest);
             found = TRUE;
         }
@@ -1066,6 +1067,7 @@
                 autoCtrls = victim->autoCtrls;
                 autoValues = victim->autoCtrlValues;
                 client = victim->client;
+                FreeResource(victim->resource, RT_XKBCLIENT);
                 free(victim);
                 found = TRUE;
             }

Reply via email to