Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xwayland for openSUSE:Factory 
checked in at 2024-01-17 22:15:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xwayland (Old)
 and      /work/SRC/openSUSE:Factory/.xwayland.new.16006 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xwayland"

Wed Jan 17 22:15:43 2024 rev:28 rq:1139423 version:23.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/xwayland/xwayland.changes        2023-12-14 
22:02:29.230653332 +0100
+++ /work/SRC/openSUSE:Factory/.xwayland.new.16006/xwayland.changes     
2024-01-17 22:15:55.168361796 +0100
@@ -1,0 +2,38 @@
+Wed Jan 17 10:20:50 UTC 2024 - Stefan Dirsch <sndir...@suse.com>
+
+- This release contains also the following patches mentioned in
+  previous sle15 releases
+  * bsc1218582-0001-dix-allocate-enough-space-for-logical-button-maps.patch
+  * bsc1218583-0001-dix-Allocate-sufficient-xEvents-for-our-DeviceStateN.patch
+  * bsc1218583-0002-dix-fix-DeviceStateNotify-event-calculation.patch
+  * bsc1218583-0003-Xi-when-creating-a-new-ButtonClass-set-the-number-of.patch
+  * bsc1218584-0001-Xi-flush-hierarchy-events-after-adding-removing-mast.patch
+  * bsc1218585-0001-Xi-do-not-keep-linked-list-pointer-during-recursion.patch
+  * bsc1218585-0002-dix-when-disabling-a-master-float-disabled-slaved-de.patch
+
+-------------------------------------------------------------------
+Tue Jan 16 21:03:25 UTC 2024 - Stefan Dirsch <sndir...@suse.com>
+
+- This release contains also the missing fixes of initial
+  U_bsc1217765-Xi-allocate-enough-XkbActions-for-our-buttons.patch
+  (bsc#1217765)
+
+-------------------------------------------------------------------
+Tue Jan 16 13:03:16 UTC 2024 - Stefan Dirsch <sndir...@suse.com>
+
+- Update to version 23.2.4
+  * This release contains fixes for the issues reported in today's
+    security advisory: 
+    https://lists.x.org/archives/xorg/2024-January/061525.html
+
+  * CVE-2023-6816  (bsc#1218582)
+  * CVE-2024-0229  (bsc#1218583)
+  * CVE-2024-21885 (bsc#1218584)
+  * CVE-2024-21886 (bsc#1218585)
+  * CVE-2024-0408
+  * CVE-2024-0409
+- supersedes the patches mentioned below:
+  * U_bsc1217765-Xi-allocate-enough-XkbActions-for-our-buttons.patch
+  * U_bsc1217766-randr-avoid-integer-truncation-in-length-check-of-Pr.patch
+
+-------------------------------------------------------------------

Old:
----
  U_bsc1217765-Xi-allocate-enough-XkbActions-for-our-buttons.patch
  U_bsc1217766-randr-avoid-integer-truncation-in-length-check-of-Pr.patch
  xwayland-23.2.2.tar.xz
  xwayland-23.2.2.tar.xz.sig

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

BETA DEBUG BEGIN:
  Old:- This release contains also the missing fixes of initial
  U_bsc1217765-Xi-allocate-enough-XkbActions-for-our-buttons.patch
  (bsc#1217765)
  Old:  * U_bsc1217765-Xi-allocate-enough-XkbActions-for-our-buttons.patch
  * U_bsc1217766-randr-avoid-integer-truncation-in-length-check-of-Pr.patch
BETA DEBUG END:

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

Other differences:
------------------
++++++ xwayland.spec ++++++
--- /var/tmp/diff_new_pack.kSqT9z/_old  2024-01-17 22:15:56.476409844 +0100
+++ /var/tmp/diff_new_pack.kSqT9z/_new  2024-01-17 22:15:56.476409844 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package xwayland
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 %endif
 
 Name:           xwayland
-Version:        23.2.2
+Version:        23.2.4
 Release:        0
 URL:            http://xorg.freedesktop.org
 Summary:        Xwayland Xserver
@@ -33,10 +33,6 @@
 Source0:        %{url}/archive/individual/xserver/%{name}-%{version}.tar.xz
 Source1:        %{url}/archive/individual/xserver/%{name}-%{version}.tar.xz.sig
 Source2:        xwayland.keyring
-
-Patch1217765:   
U_bsc1217765-Xi-allocate-enough-XkbActions-for-our-buttons.patch
-Patch1217766:   
U_bsc1217766-randr-avoid-integer-truncation-in-length-check-of-Pr.patch
-
 BuildRequires:  meson
 BuildRequires:  ninja
 BuildRequires:  pkgconfig

++++++ xwayland-23.2.2.tar.xz -> xwayland-23.2.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/Xext/xtest.c 
new/xwayland-23.2.4/Xext/xtest.c
--- old/xwayland-23.2.2/Xext/xtest.c    2023-10-25 03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/Xext/xtest.c    2024-01-16 10:38:49.000000000 +0100
@@ -148,7 +148,7 @@
     return Success;
 }
 
-static void
+void
 XTestDeviceSendEvents(DeviceIntPtr dev,
                       int type,
                       int detail,
@@ -645,9 +645,6 @@
                                      XIGetKnownProperty(XI_PROP_XTEST_DEVICE),
                                      FALSE);
         XIRegisterPropertyHandler(*keybd, DeviceSetXTestProperty, NULL, NULL);
-
-        (*ptr)->sendEventsProc = XTestDeviceSendEvents;
-        (*keybd)->sendEventsProc = XTestDeviceSendEvents;
     }
 
     free(xtestname);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/Xi/exevents.c 
new/xwayland-23.2.4/Xi/exevents.c
--- old/xwayland-23.2.2/Xi/exevents.c   2023-10-25 03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/Xi/exevents.c   2024-01-16 10:38:49.000000000 +0100
@@ -605,19 +605,20 @@
                 to->button = calloc(1, sizeof(ButtonClassRec));
                 if (!to->button)
                     FatalError("[Xi] no memory for class shift.\n");
+                to->button->numButtons = from->button->numButtons;
             }
             else
                 classes->button = NULL;
         }
 
         if (from->button->xkb_acts) {
-            if (!to->button->xkb_acts) {
-                to->button->xkb_acts = calloc(1, sizeof(XkbAction));
-                if (!to->button->xkb_acts)
-                    FatalError("[Xi] not enough memory for xkb_acts.\n");
-            }
+            size_t maxbuttons = max(to->button->numButtons, 
from->button->numButtons);
+            to->button->xkb_acts = xnfreallocarray(to->button->xkb_acts,
+                                                   maxbuttons,
+                                                   sizeof(XkbAction));
+            memset(to->button->xkb_acts, 0, maxbuttons * sizeof(XkbAction));
             memcpy(to->button->xkb_acts, from->button->xkb_acts,
-                   sizeof(XkbAction));
+                   from->button->numButtons * sizeof(XkbAction));
         }
         else {
             free(to->button->xkb_acts);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/Xi/xichangehierarchy.c 
new/xwayland-23.2.4/Xi/xichangehierarchy.c
--- old/xwayland-23.2.2/Xi/xichangehierarchy.c  2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/Xi/xichangehierarchy.c  2024-01-16 10:38:49.000000000 
+0100
@@ -270,7 +270,7 @@
         if (rc != Success)
             goto unwind;
 
-        if (!IsMaster(newptr)) {
+        if (!IsMaster(newptr) || !IsPointerDevice(newptr)) {
             client->errorValue = r->return_pointer;
             rc = BadDevice;
             goto unwind;
@@ -281,7 +281,7 @@
         if (rc != Success)
             goto unwind;
 
-        if (!IsMaster(newkeybd)) {
+        if (!IsMaster(newkeybd) || !IsKeyboardDevice(newkeybd)) {
             client->errorValue = r->return_keyboard;
             rc = BadDevice;
             goto unwind;
@@ -416,6 +416,11 @@
     size_t len;                        /* length of data remaining in request 
*/
     int rc = Success;
     int flags[MAXDEVICES] = { 0 };
+    enum {
+        NO_CHANGE,
+        FLUSH,
+        CHANGED,
+    } changes = NO_CHANGE;
 
     REQUEST(xXIChangeHierarchyReq);
     REQUEST_AT_LEAST_SIZE(xXIChangeHierarchyReq);
@@ -465,8 +470,9 @@
             rc = add_master(client, c, flags);
             if (rc != Success)
                 goto unwind;
-        }
+            changes = FLUSH;
             break;
+        }
         case XIRemoveMaster:
         {
             xXIRemoveMasterInfo *r = (xXIRemoveMasterInfo *) any;
@@ -475,8 +481,9 @@
             rc = remove_master(client, r, flags);
             if (rc != Success)
                 goto unwind;
-        }
+            changes = FLUSH;
             break;
+        }
         case XIDetachSlave:
         {
             xXIDetachSlaveInfo *c = (xXIDetachSlaveInfo *) any;
@@ -485,8 +492,9 @@
             rc = detach_slave(client, c, flags);
             if (rc != Success)
                 goto unwind;
-        }
+            changes = CHANGED;
             break;
+        }
         case XIAttachSlave:
         {
             xXIAttachSlaveInfo *c = (xXIAttachSlaveInfo *) any;
@@ -495,16 +503,25 @@
             rc = attach_slave(client, c, flags);
             if (rc != Success)
                 goto unwind;
+            changes = CHANGED;
+            break;
         }
+        default:
             break;
         }
 
+        if (changes == FLUSH) {
+            XISendDeviceHierarchyEvent(flags);
+            memset(flags, 0, sizeof(flags));
+            changes = NO_CHANGE;
+        }
+
         len -= any->length * 4;
         any = (xXIAnyHierarchyChangeInfo *) ((char *) any + any->length * 4);
     }
 
  unwind:
-
-    XISendDeviceHierarchyEvent(flags);
+    if (changes != NO_CHANGE)
+        XISendDeviceHierarchyEvent(flags);
     return rc;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/Xi/xiquerypointer.c 
new/xwayland-23.2.4/Xi/xiquerypointer.c
--- old/xwayland-23.2.2/Xi/xiquerypointer.c     2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/Xi/xiquerypointer.c     2024-01-16 10:38:49.000000000 
+0100
@@ -149,8 +149,7 @@
     if (pDev->button) {
         int i;
 
-        rep.buttons_len =
-            bytes_to_int32(bits_to_bytes(pDev->button->numButtons));
+        rep.buttons_len = bytes_to_int32(bits_to_bytes(256)); /* button map up 
to 255 */
         rep.length += rep.buttons_len;
         buttons = calloc(rep.buttons_len, 4);
         if (!buttons)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/dix/devices.c 
new/xwayland-23.2.4/dix/devices.c
--- old/xwayland-23.2.2/dix/devices.c   2023-10-25 03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/dix/devices.c   2024-01-16 10:38:49.000000000 +0100
@@ -283,6 +283,8 @@
     dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
     dev->deviceGrab.sync.event = calloc(1, sizeof(InternalEvent));
 
+    dev->sendEventsProc = XTestDeviceSendEvents;
+
     XkbSetExtension(dev, ProcessKeyboardEvent);
 
     dev->coreEvents = TRUE;
@@ -451,14 +453,20 @@
 {
     DeviceIntPtr *prev, other;
     BOOL enabled;
+    BOOL dev_in_devices_list = FALSE;
     int flags[MAXDEVICES] = { 0 };
 
     if (!dev->enabled)
         return TRUE;
 
-    for (prev = &inputInfo.devices;
-         *prev && (*prev != dev); prev = &(*prev)->next);
-    if (*prev != dev)
+    for (other = inputInfo.devices; other; other = other->next) {
+        if (other == dev) {
+            dev_in_devices_list = TRUE;
+            break;
+        }
+    }
+
+    if (!dev_in_devices_list)
         return FALSE;
 
     TouchEndPhysicallyActiveTouches(dev);
@@ -475,6 +483,13 @@
                 flags[other->id] |= XISlaveDetached;
             }
         }
+
+        for (other = inputInfo.off_devices; other; other = other->next) {
+            if (!IsMaster(other) && GetMaster(other, MASTER_ATTACHED) == dev) {
+                AttachDevice(NULL, other, NULL);
+                flags[other->id] |= XISlaveDetached;
+            }
+        }
     }
     else {
         for (other = inputInfo.devices; other; other = other->next) {
@@ -509,6 +524,9 @@
     LeaveWindow(dev);
     SetFocusOut(dev);
 
+    for (prev = &inputInfo.devices;
+         *prev && (*prev != dev); prev = &(*prev)->next);
+
     *prev = dev->next;
     dev->next = inputInfo.off_devices;
     inputInfo.off_devices = dev;
@@ -1069,6 +1087,11 @@
             dev->master = NULL;
     }
 
+    for (dev = inputInfo.off_devices; dev; dev = dev->next) {
+        if (!IsMaster(dev) && !IsFloating(dev))
+            dev->master = NULL;
+    }
+
     CloseDeviceList(&inputInfo.devices);
     CloseDeviceList(&inputInfo.off_devices);
 
@@ -1326,6 +1349,7 @@
     ValuatorClassPtr valc;
 
     BUG_RETURN_VAL(dev == NULL, FALSE);
+    BUG_RETURN_VAL(numAxes == 0, FALSE);
 
     if (numAxes > MAX_VALUATORS) {
         LogMessage(X_WARNING,
@@ -2530,6 +2554,8 @@
 
     if (master->button && master->button->numButtons != maxbuttons) {
         int i;
+        int last_num_buttons = master->button->numButtons;
+
         DeviceChangedEvent event = {
             .header = ET_Internal,
             .type = ET_DeviceChanged,
@@ -2540,6 +2566,14 @@
         };
 
         master->button->numButtons = maxbuttons;
+        if (last_num_buttons < maxbuttons) {
+            master->button->xkb_acts = 
xnfreallocarray(master->button->xkb_acts,
+                                                       maxbuttons,
+                                                       sizeof(XkbAction));
+            memset(&master->button->xkb_acts[last_num_buttons],
+                   0,
+                   (maxbuttons - last_num_buttons) * sizeof(XkbAction));
+        }
 
         memcpy(&event.buttons.names, master->button->labels, maxbuttons *
                sizeof(Atom));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/dix/enterleave.c 
new/xwayland-23.2.4/dix/enterleave.c
--- old/xwayland-23.2.2/dix/enterleave.c        2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/dix/enterleave.c        2024-01-16 10:38:49.000000000 
+0100
@@ -615,9 +615,15 @@
 
     ev->type = DeviceValuator;
     ev->deviceid = dev->id;
-    ev->num_valuators = nval < 3 ? nval : 3;
+    ev->num_valuators = nval < 6 ? nval : 6;
     ev->first_valuator = first;
     switch (ev->num_valuators) {
+    case 6:
+        ev->valuator2 = v->axisVal[first + 5];
+    case 5:
+        ev->valuator2 = v->axisVal[first + 4];
+    case 4:
+        ev->valuator2 = v->axisVal[first + 3];
     case 3:
         ev->valuator2 = v->axisVal[first + 2];
     case 2:
@@ -626,7 +632,6 @@
         ev->valuator0 = v->axisVal[first];
         break;
     }
-    first += ev->num_valuators;
 }
 
 static void
@@ -646,7 +651,7 @@
         ev->num_buttons = b->numButtons;
         memcpy((char *) ev->buttons, (char *) b->down, 4);
     }
-    else if (k) {
+    if (k) {
         ev->classes_reported |= (1 << KeyClass);
         ev->num_keys = k->xkbInfo->desc->max_key_code -
             k->xkbInfo->desc->min_key_code;
@@ -670,14 +675,26 @@
     }
 }
 
-
+/**
+ * The device state notify event is split across multiple 32-byte events.
+ * The first one contains the first 32 button state bits, the first 32
+ * key state bits, and the first 3 valuator values.
+ *
+ * If a device has more than that, the server sends out:
+ * - one deviceButtonStateNotify for buttons 32 and above
+ * - one deviceKeyStateNotify for keys 32 and above
+ * - one deviceValuator event per 6 valuators above valuator 4
+ *
+ * All events but the last one have the deviceid binary ORed with MORE_EVENTS,
+ */
 static void
 DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
 {
+    /* deviceStateNotify, deviceKeyStateNotify, deviceButtonStateNotify
+     * and one deviceValuator for each 6 valuators */
+    deviceStateNotify sev[3 + (MAX_VALUATORS + 6)/6];
     int evcount = 1;
-    deviceStateNotify *ev, *sev;
-    deviceKeyStateNotify *kev;
-    deviceButtonStateNotify *bev;
+    deviceStateNotify *ev = sev;
 
     KeyClassPtr k;
     ButtonClassPtr b;
@@ -690,87 +707,53 @@
 
     if ((b = dev->button) != NULL) {
         nbuttons = b->numButtons;
-        if (nbuttons > 32)
+        if (nbuttons > 32) /* first 32 are encoded in deviceStateNotify */
             evcount++;
     }
     if ((k = dev->key) != NULL) {
         nkeys = k->xkbInfo->desc->max_key_code - 
k->xkbInfo->desc->min_key_code;
-        if (nkeys > 32)
-            evcount++;
-        if (nbuttons > 0) {
+        if (nkeys > 32) /* first 32 are encoded in deviceStateNotify */
             evcount++;
-        }
     }
     if ((v = dev->valuator) != NULL) {
         nval = v->numAxes;
-
-        if (nval > 3)
-            evcount++;
-        if (nval > 6) {
-            if (!(k && b))
-                evcount++;
-            if (nval > 9)
-                evcount += ((nval - 7) / 3);
-        }
+        /* first three are encoded in deviceStateNotify, then
+         * it's 6 per deviceValuator event */
+        evcount += ((nval - 3) + 6)/6;
     }
 
-    sev = ev = xallocarray(evcount, sizeof(xEvent));
-    FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first);
+    BUG_RETURN(evcount <= ARRAY_SIZE(sev));
 
-    if (b != NULL) {
-        FixDeviceStateNotify(dev, ev++, NULL, b, v, first);
-        first += 3;
-        nval -= 3;
-        if (nbuttons > 32) {
-            (ev - 1)->deviceid |= MORE_EVENTS;
-            bev = (deviceButtonStateNotify *) ev++;
-            bev->type = DeviceButtonStateNotify;
-            bev->deviceid = dev->id;
-            memcpy((char *) &bev->buttons[4], (char *) &b->down[4],
-                   DOWN_LENGTH - 4);
-        }
-        if (nval > 0) {
-            (ev - 1)->deviceid |= MORE_EVENTS;
-            FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
-            first += 3;
-            nval -= 3;
-        }
+    FixDeviceStateNotify(dev, ev, k, b, v, first);
+
+    if (b != NULL && nbuttons > 32) {
+        deviceButtonStateNotify *bev = (deviceButtonStateNotify *) ++ev;
+        (ev - 1)->deviceid |= MORE_EVENTS;
+        bev->type = DeviceButtonStateNotify;
+        bev->deviceid = dev->id;
+        memcpy((char *) &bev->buttons[4], (char *) &b->down[4],
+               DOWN_LENGTH - 4);
     }
 
-    if (k != NULL) {
-        FixDeviceStateNotify(dev, ev++, k, NULL, v, first);
-        first += 3;
-        nval -= 3;
-        if (nkeys > 32) {
-            (ev - 1)->deviceid |= MORE_EVENTS;
-            kev = (deviceKeyStateNotify *) ev++;
-            kev->type = DeviceKeyStateNotify;
-            kev->deviceid = dev->id;
-            memmove((char *) &kev->keys[0], (char *) &k->down[4], 28);
-        }
-        if (nval > 0) {
-            (ev - 1)->deviceid |= MORE_EVENTS;
-            FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
-            first += 3;
-            nval -= 3;
-        }
+    if (k != NULL && nkeys > 32) {
+        deviceKeyStateNotify *kev = (deviceKeyStateNotify *) ++ev;
+        (ev - 1)->deviceid |= MORE_EVENTS;
+        kev->type = DeviceKeyStateNotify;
+        kev->deviceid = dev->id;
+        memmove((char *) &kev->keys[0], (char *) &k->down[4], 28);
     }
 
+    first = 3;
+    nval -= 3;
     while (nval > 0) {
-        FixDeviceStateNotify(dev, ev++, NULL, NULL, v, first);
-        first += 3;
-        nval -= 3;
-        if (nval > 0) {
-            (ev - 1)->deviceid |= MORE_EVENTS;
-            FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
-            first += 3;
-            nval -= 3;
-        }
+        ev->deviceid |= MORE_EVENTS;
+        FixDeviceValuator(dev, (deviceValuator *) ++ev, v, first);
+        first += 6;
+        nval -= 6;
     }
 
     DeliverEventsToWindow(dev, win, (xEvent *) sev, evcount,
                           DeviceStateNotifyMask, NullGrab);
-    free(sev);
 }
 
 void
@@ -784,8 +767,9 @@
 
     mouse = IsFloating(dev) ? dev : GetMaster(dev, MASTER_POINTER);
 
-    /* XI 2 event */
-    btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0;
+    /* XI 2 event contains the logical button map - maps are CARD8
+     * so we need 256 bits for the possibly maximum mapping */
+    btlen = (mouse->button) ? bits_to_bytes(256) : 0;
     btlen = bytes_to_int32(btlen);
     len = sizeof(xXIFocusInEvent) + btlen * 4;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/glamor/glamor_copy.c 
new/xwayland-23.2.4/glamor/glamor_copy.c
--- old/xwayland-23.2.2/glamor/glamor_copy.c    2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/glamor/glamor_copy.c    2024-01-16 10:38:49.000000000 
+0100
@@ -378,7 +378,7 @@
     if (gc && !glamor_set_planemask(gc->depth, gc->planemask))
         goto bail_ctx;
 
-    if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy))
+    if (!glamor_set_alu(dst, gc ? gc->alu : GXcopy))
         goto bail_ctx;
 
     if (bitplane && !glamor_priv->can_copyplane)
@@ -529,7 +529,7 @@
     if (gc && !glamor_set_planemask(gc->depth, gc->planemask))
         goto bail_ctx;
 
-    if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy))
+    if (!glamor_set_alu(dst, gc ? gc->alu : GXcopy))
         goto bail_ctx;
 
     /* Find the size of the area to copy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/glamor/glamor_gradient.c 
new/xwayland-23.2.4/glamor/glamor_gradient.c
--- old/xwayland-23.2.2/glamor/glamor_gradient.c        2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/glamor/glamor_gradient.c        2024-01-16 
10:38:49.000000000 +0100
@@ -971,7 +971,7 @@
          0))
         goto GRADIENT_FAIL;
 
-    glamor_set_alu(screen, GXcopy);
+    glamor_set_alu(&pixmap->drawable, GXcopy);
 
     /* Set all the stops and colors to shader. */
     if (stops_count > RADIAL_SMALL_STOPS) {
@@ -1288,7 +1288,7 @@
          1))
         goto GRADIENT_FAIL;
 
-    glamor_set_alu(screen, GXcopy);
+    glamor_set_alu(&pixmap->drawable, GXcopy);
 
     /* Normalize the PTs. */
     glamor_set_normalize_pt(xscale, yscale,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/glamor/glamor_pixmap.c 
new/xwayland-23.2.4/glamor/glamor_pixmap.c
--- old/xwayland-23.2.2/glamor/glamor_pixmap.c  2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/glamor/glamor_pixmap.c  2024-01-16 10:38:49.000000000 
+0100
@@ -120,8 +120,9 @@
 }
 
 Bool
-glamor_set_alu(ScreenPtr screen, unsigned char alu)
+glamor_set_alu(DrawablePtr drawable, unsigned char alu)
 {
+    ScreenPtr screen = drawable->pScreen;
     glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
 
     if (glamor_priv->is_gles) {
@@ -135,6 +136,21 @@
         glDisable(GL_COLOR_LOGIC_OP);
         return TRUE;
     }
+
+    switch (alu) {
+    case GXnoop:
+    case GXor:
+    case GXset:
+        /* These leave the alpha channel at 1.0 */
+        break;
+    default:
+        if (glamor_drawable_effective_depth(drawable) == 24 &&
+            glamor_get_drawable_pixmap(drawable)->drawable.depth == 32) {
+            glamor_fallback("ALU %x not supported with mixed depth\n", alu);
+            return FALSE;
+        }
+    }
+
     glEnable(GL_COLOR_LOGIC_OP);
     switch (alu) {
     case GXclear:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/glamor/glamor_priv.h 
new/xwayland-23.2.4/glamor/glamor_priv.h
--- old/xwayland-23.2.2/glamor/glamor_priv.h    2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/glamor/glamor_priv.h    2024-01-16 10:38:49.000000000 
+0100
@@ -642,7 +642,7 @@
  * */
 void glamor_set_destination_pixmap_priv_nc(glamor_screen_private *glamor_priv, 
PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv);
 
-Bool glamor_set_alu(ScreenPtr screen, unsigned char alu);
+Bool glamor_set_alu(DrawablePtr drawable, unsigned char alu);
 Bool glamor_set_planemask(int depth, unsigned long planemask);
 RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/glamor/glamor_render.c 
new/xwayland-23.2.4/glamor/glamor_render.c
--- old/xwayland-23.2.2/glamor/glamor_render.c  2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/glamor/glamor_render.c  2024-01-16 10:38:49.000000000 
+0100
@@ -835,6 +835,20 @@
 }
 
 static Bool
+render_op_uses_src_alpha(CARD8 op)
+{
+    struct blendinfo *info = &composite_op_info[op];
+
+    switch (info->dest_blend) {
+    case GL_ONE_MINUS_SRC_ALPHA:
+    case GL_SRC_ALPHA:
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+static Bool
 glamor_composite_choose_shader(CARD8 op,
                                PicturePtr source,
                                PicturePtr mask,
@@ -947,7 +961,8 @@
         key.dest_swizzle = SHADER_DEST_SWIZZLE_ALPHA_TO_RED;
     } else {
         if (dest_pixmap->drawable.depth == 32 &&
-            glamor_drawable_effective_depth(dest->pDrawable) == 24)
+            glamor_drawable_effective_depth(dest->pDrawable) == 24 &&
+            !render_op_uses_src_alpha(op))
             key.dest_swizzle = SHADER_DEST_SWIZZLE_IGNORE_ALPHA;
         else
             key.dest_swizzle = SHADER_DEST_SWIZZLE_DEFAULT;
@@ -1181,6 +1196,7 @@
     Bool ret = FALSE;
     glamor_composite_shader *shader = NULL, *shader_ca = NULL;
     struct blendinfo op_info, op_info_ca;
+    Bool restore_colormask = FALSE;
 
     if (!glamor_composite_choose_shader(op, source, mask, dest,
                                         source_pixmap, mask_pixmap, 
dest_pixmap,
@@ -1205,9 +1221,17 @@
 
     glamor_make_current(glamor_priv);
 
+    if (ca_state != CA_TWO_PASS &&
+        key.dest_swizzle == SHADER_DEST_SWIZZLE_DEFAULT &&
+        dest_pixmap->drawable.depth == 32 &&
+        glamor_drawable_effective_depth(dest->pDrawable) == 24) {
+        glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE);
+        restore_colormask = TRUE;
+    }
+
     glamor_set_destination_pixmap_priv_nc(glamor_priv, dest_pixmap, 
dest_pixmap_priv);
     glamor_composite_set_shader_blend(glamor_priv, dest_pixmap_priv, &key, 
shader, &op_info);
-    glamor_set_alu(screen, GXcopy);
+    glamor_set_alu(dest->pDrawable, GXcopy);
 
     glamor_priv->has_source_coords = key.source != SHADER_SOURCE_SOLID;
     glamor_priv->has_mask_coords = (key.mask != SHADER_MASK_NONE &&
@@ -1347,6 +1371,8 @@
 
     glDisable(GL_SCISSOR_TEST);
 disable_va:
+    if (restore_colormask)
+        glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
     glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
     glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
     glDisableVertexAttribArray(GLAMOR_VERTEX_MASK);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/glamor/glamor_transform.c 
new/xwayland-23.2.4/glamor/glamor_transform.c
--- old/xwayland-23.2.2/glamor/glamor_transform.c       2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/glamor/glamor_transform.c       2024-01-16 
10:38:49.000000000 +0100
@@ -143,7 +143,7 @@
 
     pixel = gc->fgPixel;
 
-    if (!glamor_set_alu(drawable->pScreen, alu)) {
+    if (!glamor_set_alu(drawable, alu)) {
         switch (gc->alu) {
         case GXclear:
             pixel = 0;
@@ -209,7 +209,7 @@
                  GLint          offset_uniform,
                  GLint          size_inv_uniform)
 {
-    if (!glamor_set_alu(drawable->pScreen, gc->alu))
+    if (!glamor_set_alu(drawable, gc->alu))
         return FALSE;
 
     if (!glamor_set_planemask(gc->depth, gc->planemask))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/glamor/glamor_xv.c 
new/xwayland-23.2.4/glamor/glamor_xv.c
--- old/xwayland-23.2.2/glamor/glamor_xv.c      2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/glamor/glamor_xv.c      2024-01-16 10:38:49.000000000 
+0100
@@ -356,7 +356,7 @@
     off[2] = Loff * yco + Coff * (uco[2] + vco[2]) + bright;
     gamma = 1.0;
 
-    glamor_set_alu(screen, GXcopy);
+    glamor_set_alu(&pixmap->drawable, GXcopy);
 
     for (i = 0; i < 3; i++) {
         if (port_priv->src_pix[i]) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/glx/glxcmds.c 
new/xwayland-23.2.4/glx/glxcmds.c
--- old/xwayland-23.2.2/glx/glxcmds.c   2023-10-25 03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/glx/glxcmds.c   2024-01-16 10:38:49.000000000 +0100
@@ -48,6 +48,7 @@
 #include "indirect_util.h"
 #include "protocol-versions.h"
 #include "glxvndabi.h"
+#include "xace.h"
 
 static char GLXServerVendorName[] = "SGI";
 
@@ -1392,6 +1393,13 @@
     if (!pPixmap)
         return BadAlloc;
 
+    err = XaceHook(XACE_RESOURCE_ACCESS, client, glxDrawableId, RT_PIXMAP,
+                   pPixmap, RT_NONE, NULL, DixCreateAccess);
+    if (err != Success) {
+        (*pGlxScreen->pScreen->DestroyPixmap) (pPixmap);
+        return err;
+    }
+
     /* Assign the pixmap the same id as the pbuffer and add it as a
      * resource so it and the DRI2 drawable will be reclaimed when the
      * pbuffer is destroyed. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/hw/xwayland/xwayland-cursor.c 
new/xwayland-23.2.4/hw/xwayland/xwayland-cursor.c
--- old/xwayland-23.2.2/hw/xwayland/xwayland-cursor.c   2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/hw/xwayland/xwayland-cursor.c   2024-01-16 
10:38:49.000000000 +0100
@@ -431,7 +431,7 @@
 Bool
 xwl_screen_init_cursor(struct xwl_screen *xwl_screen)
 {
-    if (!dixRegisterPrivateKey(&xwl_cursor_private_key, PRIVATE_CURSOR_BITS, 
0))
+    if (!dixRegisterPrivateKey(&xwl_cursor_private_key, PRIVATE_CURSOR, 0))
         return FALSE;
 
     return miPointerInitialize(xwl_screen->screen,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xwayland-23.2.2/hw/xwayland/xwayland-glamor-eglstream.c 
new/xwayland-23.2.4/hw/xwayland/xwayland-glamor-eglstream.c
--- old/xwayland-23.2.2/hw/xwayland/xwayland-glamor-eglstream.c 2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/hw/xwayland/xwayland-glamor-eglstream.c 2024-01-16 
10:38:49.000000000 +0100
@@ -559,7 +559,7 @@
      * won't actually draw to it
      */
     xwl_glamor_egl_make_current(xwl_screen);
-    glamor_set_alu(xwl_screen->screen, GXcopy);
+    glamor_set_alu(&pixmap->drawable, GXcopy);
 
     glBindFramebuffer(GL_FRAMEBUFFER, 0);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/hw/xwayland/xwayland-output.c 
new/xwayland-23.2.4/hw/xwayland/xwayland-output.c
--- old/xwayland-23.2.2/hw/xwayland/xwayland-output.c   2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/hw/xwayland/xwayland-output.c   2024-01-16 
10:38:49.000000000 +0100
@@ -601,6 +601,7 @@
 apply_output_change(struct xwl_output *xwl_output)
 {
     struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
+    struct xwl_window *xwl_window;
     struct xwl_output *it;
     int mode_width, mode_height, count;
     int width = 0, height = 0, has_this_output = 0;
@@ -658,6 +659,15 @@
         update_screen_size(xwl_screen, width, height);
     else
         RRTellChanged(xwl_screen->screen);
+
+    /* If running rootful and fullscreen, make sure to match the new setup */
+    if (xwl_screen->fullscreen) {
+        /* The root window may not yet be created */
+        if (xwl_screen->screen->root) {
+            xwl_window = xwl_window_get(xwl_screen->screen->root);
+            xwl_window_rootful_update_fullscreen(xwl_window, xwl_output);
+        }
+    }
 }
 
 static void
@@ -673,6 +683,7 @@
     }
 
     snprintf(xwl_output->randr_output->name, MAX_OUTPUT_NAME, "%s", name);
+    xwl_output->randr_output->nameLength = 
strlen(xwl_output->randr_output->name);
 }
 
 static void
@@ -836,9 +847,6 @@
     xwl_output->xwl_screen = xwl_screen;
 
     if (with_xrandr) {
-        snprintf(name, MAX_OUTPUT_NAME, "XWAYLAND%d",
-                 xwl_screen_get_next_output_serial(xwl_screen));
-
         xwl_output->randr_crtc = RRCrtcCreate(xwl_screen->screen, xwl_output);
         if (!xwl_output->randr_crtc) {
             ErrorF("Failed creating RandR CRTC\n");
@@ -846,12 +854,17 @@
         }
         RRCrtcSetRotations (xwl_output->randr_crtc, ALL_ROTATIONS);
 
+        /* Allocate MAX_OUTPUT_NAME data for the output name, all filled with 
zeros */
         xwl_output->randr_output = RROutputCreate(xwl_screen->screen, name,
                                                   MAX_OUTPUT_NAME, xwl_output);
         if (!xwl_output->randr_output) {
             ErrorF("Failed creating RandR Output\n");
             goto err;
         }
+        /* Set the default output name to a sensible value */
+        snprintf(name, MAX_OUTPUT_NAME, "XWAYLAND%d",
+                 xwl_screen_get_next_output_serial(xwl_screen));
+        xwl_output_set_name(xwl_output, name);
         xwl_output_set_emulated(xwl_output);
 
         RRCrtcGammaSetSize(xwl_output->randr_crtc, 256);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/hw/xwayland/xwayland-types.h 
new/xwayland-23.2.4/hw/xwayland/xwayland-types.h
--- old/xwayland-23.2.2/hw/xwayland/xwayland-types.h    2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/hw/xwayland/xwayland-types.h    2024-01-16 
10:38:49.000000000 +0100
@@ -31,5 +31,6 @@
 struct xwl_screen;
 struct xwl_egl_backend;
 struct xwl_drm_lease;
+struct xwl_output;
 
 #endif /* XWAYLAND_TYPES_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/hw/xwayland/xwayland-window.c 
new/xwayland-23.2.4/hw/xwayland/xwayland-window.c
--- old/xwayland-23.2.2/hw/xwayland/xwayland-window.c   2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/hw/xwayland/xwayland-window.c   2024-01-16 
10:38:49.000000000 +0100
@@ -570,6 +570,29 @@
 }
 
 void
+xwl_window_rootful_update_fullscreen(struct xwl_window *xwl_window,
+                                     struct xwl_output *xwl_output)
+{
+    struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
+
+    if (!xwl_screen->fullscreen)
+        return;
+
+    if (xwl_window->window != xwl_screen->screen->root)
+        return;
+
+    if (xwl_window->wl_output_fullscreen != xwl_output->output)
+        return;
+
+    /* The size and position of the output may have changed, clear our
+     * output to make sure the next call to xwl_window_set_fullscreen()
+     * recomputes the size and updates the viewport as needed.
+     */
+    xwl_window->wl_output_fullscreen = NULL;
+    xwl_window_set_fullscreen(xwl_window);
+}
+
+void
 xwl_window_rootful_update_title(struct xwl_window *xwl_window)
 {
     struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
@@ -766,13 +789,16 @@
                               struct wl_array *states)
 {
     struct xwl_window *xwl_window = data;
+    struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
 
     /* Maintain our current size if no dimensions are requested */
     if (width == 0 && height == 0)
         return;
 
-    /* This will be committed by the xdg_surface.configure handler */
-    xwl_window_maybe_resize(xwl_window, width, height);
+    if (!xwl_screen->fullscreen) {
+        /* This will be committed by the xdg_surface.configure handler */
+        xwl_window_maybe_resize(xwl_window, width, height);
+    }
 }
 
 static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/hw/xwayland/xwayland-window.h 
new/xwayland-23.2.4/hw/xwayland/xwayland-window.h
--- old/xwayland-23.2.2/hw/xwayland/xwayland-window.h   2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/hw/xwayland/xwayland-window.h   2024-01-16 
10:38:49.000000000 +0100
@@ -135,7 +135,8 @@
 Bool xwl_window_is_toplevel(WindowPtr window);
 void xwl_window_check_resolution_change_emulation(struct xwl_window 
*xwl_window);
 void xwl_window_rootful_update_title(struct xwl_window *xwl_window);
-
+void xwl_window_rootful_update_fullscreen(struct xwl_window *xwl_window,
+                                          struct xwl_output *xwl_output);
 void xwl_window_set_window_pixmap(WindowPtr window, PixmapPtr pixmap);
 
 Bool xwl_realize_window(WindowPtr window);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/hw/xwayland/xwayland-xtest.c 
new/xwayland-23.2.4/hw/xwayland/xwayland-xtest.c
--- old/xwayland-23.2.2/hw/xwayland/xwayland-xtest.c    2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/hw/xwayland/xwayland-xtest.c    2024-01-16 
10:38:49.000000000 +0100
@@ -300,7 +300,8 @@
     SetNotifyFd(xwl_ei_client->oeffis_fd, xwl_handle_oeffis_event,
         X_NOTIFY_READ, xwl_ei_client);
 
-    oeffis_create_session(xwl_ei_client->oeffis, OEFFIS_DEVICE_ALL_DEVICES);
+    oeffis_create_session(xwl_ei_client->oeffis,
+                          OEFFIS_DEVICE_KEYBOARD | OEFFIS_DEVICE_POINTER);
 
     return true;
 #else
@@ -646,6 +647,9 @@
     struct xwl_ei_client *xwl_ei_client;
     bool accept = false;
 
+    if (!IsXTestDevice(dev, NULL))
+        return;
+
     client = GetCurrentClient();
     xwl_ei_client = get_xwl_ei_client(client);
     if (!xwl_ei_client) {
@@ -914,9 +918,7 @@
     DeviceIntPtr d;
 
     nt_list_for_each_entry(d, inputInfo.devices, next) {
-        if (IsXTestDevice(d, NULL)) {
-            xwayland_override_events_proc(d);
-        }
+        xwayland_override_events_proc(d);
     }
 }
 
@@ -926,8 +928,6 @@
     DeviceIntPtr d;
 
     nt_list_for_each_entry(d, inputInfo.devices, next) {
-        if (IsXTestDevice(d, NULL)) {
-            xwayland_restore_events_proc(d);
-        }
+        xwayland_restore_events_proc(d);
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/include/exevents.h 
new/xwayland-23.2.4/include/exevents.h
--- old/xwayland-23.2.2/include/exevents.h      2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/include/exevents.h      2024-01-16 10:38:49.000000000 
+0100
@@ -305,4 +305,11 @@
 extern int
  XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len);
 
+void
+XTestDeviceSendEvents(DeviceIntPtr dev,
+                      int type,
+                      int detail,
+                      int flags,
+                      const ValuatorMask *mask);
+
 #endif                          /* EXEVENTS_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/include/meson.build 
new/xwayland-23.2.4/include/meson.build
--- old/xwayland-23.2.2/include/meson.build     2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/include/meson.build     2024-01-16 10:38:49.000000000 
+0100
@@ -124,6 +124,7 @@
 conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h') ? '1' : false)
 conf_data.set('HAVE_STRING_H', cc.has_header('string.h') ? '1' : false)
 conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h') ? '1' : false)
+conf_data.set('HAVE_SYS_UCRED_H', cc.has_header('sys/ucred.h') ? '1' : false)
 conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h') ? '1' : 
false)
 conf_data.set('HAVE_SYS_SYSMACROS_H', cc.has_header('sys/sysmacros.h') ? '1' : 
false)
 
@@ -164,6 +165,7 @@
 conf_data.set('HAVE_VASPRINTF', cc.has_function('vasprintf') ? '1' : false)
 conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf') ? '1' : false)
 conf_data.set('HAVE_WALKCONTEXT', cc.has_function('walkcontext') ? '1' : false)
+conf_data.set('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', 
prefix : '#include <sys/ucred.h>') ? '1' : false)
 
 conf_data.set('BUSFAULT', conf_data.get('HAVE_SIGACTION'))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/meson.build 
new/xwayland-23.2.4/meson.build
--- old/xwayland-23.2.2/meson.build     2023-10-25 03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/meson.build     2024-01-16 10:38:49.000000000 +0100
@@ -3,10 +3,10 @@
             'buildtype=debugoptimized',
             'c_std=gnu99',
         ],
-        version: '23.2.2',
+        version: '23.2.4',
         meson_version: '>= 0.52.0',
 )
-release_date = '2023-10-25'
+release_date = '2024-01-16'
 
 add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
 cc = meson.get_compiler('c')
@@ -476,7 +476,10 @@
 
 top_dir_inc = include_directories('.')
 
-serverconfigdir = join_paths(get_option('prefix'), get_option('libdir'), 
'xorg')
+serverconfigdir = get_option('serverconfigdir')
+if serverconfigdir == ''
+    serverconfigdir = join_paths(get_option('prefix'), get_option('libdir'), 
'xorg')
+endif
 
 manpage_config = configuration_data()
 manpage_config.set('vendorversion', '"xorg-server @0@" "X Version 
11"'.format(meson.project_version()))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/meson_options.txt 
new/xwayland-23.2.4/meson_options.txt
--- old/xwayland-23.2.2/meson_options.txt       2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/meson_options.txt       2024-01-16 10:38:49.000000000 
+0100
@@ -14,6 +14,8 @@
 option('default_font_path', type: 'string')
 option('fontrootdir', type: 'string',
         description: 'Root directory for legacy fonts. Default: from 
font-utils.pc or $datadir/fonts/X11')
+option('serverconfigdir', type: 'string',
+        description: 'Miscellaneous server configuration files path. Default: 
$libdir/xorg')
 
 option('glx', type: 'boolean', value: true)
 option('xdmcp', type: 'boolean', value: true)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/os/access.c 
new/xwayland-23.2.4/os/access.c
--- old/xwayland-23.2.2/os/access.c     2023-10-25 03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/os/access.c     2024-01-16 10:38:49.000000000 +0100
@@ -116,6 +116,10 @@
 #endif
 #endif
 
+#ifdef HAVE_SYS_UCRED_H
+#include <sys/ucred.h>
+#endif
+
 #ifdef HAVE_SYS_UN_H
 #include <sys/un.h>
 #endif
@@ -1166,7 +1170,7 @@
 int
 GetLocalClientCreds(ClientPtr client, LocalClientCredRec ** lccp)
 {
-#if defined(HAVE_GETPEEREID) || defined(HAVE_GETPEERUCRED) || 
defined(SO_PEERCRED)
+#if defined(HAVE_GETPEEREID) || defined(HAVE_GETPEERUCRED) || 
defined(SO_PEERCRED) || defined(LOCAL_PEERCRED)
     int fd;
     XtransConnInfo ci;
     LocalClientCredRec *lcc;
@@ -1177,6 +1181,9 @@
 #elif defined(SO_PEERCRED)
     struct ucred peercred;
     socklen_t so_len = sizeof(peercred);
+#elif defined(LOCAL_PEERCRED) && defined(HAVE_XUCRED_CR_PID)
+    struct xucred peercred;
+    socklen_t so_len = sizeof(peercred);
 #elif defined(HAVE_GETPEEREID)
     uid_t uid;
     gid_t gid;
@@ -1253,6 +1260,17 @@
     lcc->pid = peercred.pid;
     lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET | LCC_PID_SET;
     return 0;
+#elif defined(LOCAL_PEERCRED) && defined(HAVE_XUCRED_CR_PID)
+    if (getsockopt(fd, SOL_LOCAL, LOCAL_PEERCRED, &peercred, &so_len) != 0 ||
+        peercred.cr_version != XUCRED_VERSION) {
+        FreeLocalClientCreds(lcc);
+        return -1;
+    }
+    lcc->euid = peercred.cr_uid;
+    lcc->egid = peercred.cr_gid;
+    lcc->pid = peercred.cr_pid;
+    lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET | LCC_PID_SET;
+    return 0;
 #elif defined(HAVE_GETPEEREID)
     if (getpeereid(fd, &uid, &gid) == -1) {
         FreeLocalClientCreds(lcc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/os/client.c 
new/xwayland-23.2.4/os/client.c
--- old/xwayland-23.2.2/os/client.c     2023-10-25 03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/os/client.c     2024-01-16 10:38:49.000000000 +0100
@@ -73,6 +73,11 @@
 #include <limits.h>
 #endif
 
+#if defined(__DragonFly__) || defined(__FreeBSD__)
+#include <sys/sysctl.h>
+#include <errno.h>
+#endif
+
 #ifdef __APPLE__
 #include <dispatch/dispatch.h>
 #include <errno.h>
@@ -136,7 +141,7 @@
 void
 DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
 {
-#if !defined(__APPLE__)
+#if !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__FreeBSD__)
     char path[PATH_MAX + 1];
     int totsize = 0;
     int fd = 0;
@@ -250,6 +255,56 @@
 
         free(procargs);
     }
+#elif defined(__DragonFly__) || defined(__FreeBSD__)
+    /* on DragonFly and FreeBSD use KERN_PROC_ARGS */
+    {
+        int mib[] = {
+            CTL_KERN,
+            KERN_PROC,
+            KERN_PROC_ARGS,
+            pid,
+        };
+
+        /* Determine exact size instead of relying on kern.argmax */
+        size_t len;
+        if (sysctl(mib, ARRAY_SIZE(mib), NULL, &len, NULL, 0) != 0) {
+            ErrorF("Failed to query KERN_PROC_ARGS length for PID %d: %s\n", 
pid, strerror(errno));
+            return;
+        }
+
+        /* Read KERN_PROC_ARGS contents. Similar to /proc/pid/cmdline
+         * the process name and each argument are separated by NUL byte. */
+        char *const procargs = malloc(len);
+        if (sysctl(mib, ARRAY_SIZE(mib), procargs, &len, NULL, 0) != 0) {
+            ErrorF("Failed to get KERN_PROC_ARGS for PID %d: %s\n", pid, 
strerror(errno));
+            free(procargs);
+            return;
+        }
+
+        /* Construct the process name without arguments. */
+        if (cmdname) {
+            *cmdname = strdup(procargs);
+        }
+
+        /* Construct the arguments for client process. */
+        if (cmdargs) {
+            size_t cmdsize = strlen(procargs) + 1;
+            size_t argsize = len - cmdsize;
+            char *args = NULL;
+
+            if (argsize > 0)
+                args = procargs + cmdsize;
+            if (args) {
+                /* Replace NUL with space except terminating NUL */
+                for (size_t i = 0; i < (argsize - 1); i++) {
+                    if (args[i] == '\0')
+                        args[i] = ' ';
+                }
+                *cmdargs = strdup(args);
+            }
+        }
+        free(procargs);
+    }
 #elif defined(__OpenBSD__)
     /* on OpenBSD use kvm_getargv() */
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/randr/rrproperty.c 
new/xwayland-23.2.4/randr/rrproperty.c
--- old/xwayland-23.2.2/randr/rrproperty.c      2023-10-25 03:52:55.000000000 
+0200
+++ new/xwayland-23.2.4/randr/rrproperty.c      2024-01-16 10:38:49.000000000 
+0100
@@ -530,7 +530,7 @@
     char format, mode;
     unsigned long len;
     int sizeInBytes;
-    int totalSize;
+    uint64_t totalSize;
     int err;
 
     REQUEST_AT_LEAST_SIZE(xRRChangeOutputPropertyReq);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.2/randr/rrproviderproperty.c 
new/xwayland-23.2.4/randr/rrproviderproperty.c
--- old/xwayland-23.2.2/randr/rrproviderproperty.c      2023-10-25 
03:52:55.000000000 +0200
+++ new/xwayland-23.2.4/randr/rrproviderproperty.c      2024-01-16 
10:38:49.000000000 +0100
@@ -498,7 +498,7 @@
     char format, mode;
     unsigned long len;
     int sizeInBytes;
-    int totalSize;
+    uint64_t totalSize;
     int err;
 
     REQUEST_AT_LEAST_SIZE(xRRChangeProviderPropertyReq);

++++++ xwayland.keyring ++++++
--- /var/tmp/diff_new_pack.kSqT9z/_old  2024-01-17 22:15:57.016429687 +0100
+++ /var/tmp/diff_new_pack.kSqT9z/_new  2024-01-17 22:15:57.020429834 +0100
@@ -145,4 +145,61 @@
 9hoAnigKVkYBlc2jpAKdD+bULpWgw+sz
 =Q/D0
 -----END PGP PUBLIC KEY BLOCK-----
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Comment: Hostname: pg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