Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xorg-x11-server for openSUSE:Factory checked in at 2022-01-05 13:39:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xorg-x11-server (Old) and /work/SRC/openSUSE:Factory/.xorg-x11-server.new.1896 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xorg-x11-server" Wed Jan 5 13:39:42 2022 rev:401 rq:943815 version:21.1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/xorg-x11-server/xorg-x11-server.changes 2021-12-16 21:19:42.194530166 +0100 +++ /work/SRC/openSUSE:Factory/.xorg-x11-server.new.1896/xorg-x11-server.changes 2022-01-05 13:40:04.621540885 +0100 @@ -1,0 +2,20 @@ +Mon Jan 3 21:03:34 UTC 2022 - Stefan Dirsch <sndir...@suse.com> + +- u_xfree86-activate-GPU-screens-on-autobind.patch + * Part of the original patch by Dave Airlie has landed + 078277e4d92f05a90c4715d61b89b9d9d38d68ea, this contains the + remainder of what was in SUSE before Xorg 21.1. + (github issue#1254, boo#1192751) + +------------------------------------------------------------------- +Mon Jan 3 18:29:59 UTC 2022 - Stefan Dirsch <sndir...@suse.com> + +- Update to version 21.1.3 + * This release fixes several regressions since 1.20.x and 21.1.1 + + glx/dri: Filter out fbconfigs that don't have a supported pixmap format + + xf86/logind: Fix compilation error when built without logind/platform bus + + xf86/logind: fix missing call to vtenter if the platform device is not paused + + Convert more funcs to use InternalEvent. + + os: Try to discover the current seat with the XDG_SEAT var first + +------------------------------------------------------------------- @@ -4 +24 @@ -- Update to version 21.1.1 +- Update to version 21.1.2 Old: ---- xorg-server-21.1.2.tar.xz New: ---- u_xfree86-activate-GPU-screens-on-autobind.patch xorg-server-21.1.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11-server.spec ++++++ --- /var/tmp/diff_new_pack.evXkWT/_old 2022-01-05 13:40:05.525541596 +0100 +++ /var/tmp/diff_new_pack.evXkWT/_new 2022-01-05 13:40:05.529541599 +0100 @@ -1,7 +1,7 @@ # # spec file for package xorg-x11-server # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,7 +36,7 @@ %endif Name: xorg-x11-server -Version: 21.1.2 +Version: 21.1.3 Release: 0 URL: http://xorg.freedesktop.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -240,6 +240,8 @@ Patch1920: u_xf86-Accept-devices-with-the-hyperv_drm-driver.patch +Patch1930: u_xfree86-activate-GPU-screens-on-autobind.patch + %description This package contains the X.Org Server. @@ -393,6 +395,7 @@ %patch1900 -p1 %patch1910 -p1 %patch1920 -p1 +%patch1930 -p1 %build %global _lto_cflags %{?_lto_cflags} -ffat-lto-objects ++++++ u_xfree86-activate-GPU-screens-on-autobind.patch ++++++ >From 358448649d39b6cf4de49c0f65ce2b5f4c702c65 Mon Sep 17 00:00:00 2001 From: Dave Airlie <airl...@redhat.com> Date: Sun, 2 Jan 2022 01:27:31 +0200 Subject: [PATCH xserver] xfree86: activate GPU screens on autobind Part of the original patch by Dave Airlie has landed 078277e4d92f05a90c4715d61b89b9d9d38d68ea, this contains the remainder of what was in SUSE before Xorg 21.1. Signed-off-by: Dave Airlie <airl...@gmail.com> --- dix/main.c | 4 + hw/xfree86/common/xf86Init.c | 185 +++++++++++++++++++++++++++++++++++ include/dix.h | 2 + 3 files changed, 191 insertions(+) diff --git a/dix/main.c b/dix/main.c index bfc8addbe..c7b8ed49e 100644 --- a/dix/main.c +++ b/dix/main.c @@ -121,6 +121,8 @@ extern void Dispatch(void); CallbackListPtr RootWindowFinalizeCallback = NULL; +CallbackListPtr RootWindowInitialized = NULL; + int dix_main(int argc, char *argv[], char *envp[]) { @@ -242,6 +244,8 @@ dix_main(int argc, char *argv[], char *envp[]) for (i = 0; i < screenInfo.numScreens; i++) InitRootWindow(screenInfo.screens[i]->root); + CallCallbacks(&RootWindowInitialized, NULL); + InitCoreDevices(); InitInput(argc, argv); InitAndStartDevices(); diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 380288ca4..9839cb19c 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -204,6 +204,9 @@ xf86HasTTYs(void) #endif } +static void +xf86AutoConfigProviderOutputs(CallbackListPtr *pcbl, void *data, void *call_data); + static void xf86AutoConfigOutputDevices(void) { @@ -217,6 +220,8 @@ xf86AutoConfigOutputDevices(void) RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]), xf86ScrnToScreen(xf86Screens[scrnum])); } + + AddCallback(&RootWindowInitialized, xf86AutoConfigProviderOutputs, NULL); } static void @@ -258,6 +263,186 @@ AddVTAtoms(CallbackListPtr *pcbl, void *data, void *screen) "Failed to register VT properties\n"); } + +/* + * This function activates all outputs of all GPU screens associated with the + * given master screen and sets them to their preferred resolution next to + * each other left-to-right. + */ +static void +xf86AutoConfigureProviderOutputsForMaster(ScreenPtr pMasterScreen) +{ + ScreenPtr pScreen; + rrScrPrivPtr pMasterScrPriv, pScrPriv; + RROutputPtr pOutput; + RRCrtcPtr pCrtc; + RRCrtcPtr *pUsedCrtcs; + int usedCrtcsCount; + int screenWidth, screenHeight, screenWidthMM, screenHeightMM; + int i, j, k, l; + + struct OutputConfig { + RROutputPtr pOutput; + RRCrtcPtr pCrtc; + + int x; + int y; + } *outputConfigs; + int outputConfigsCount = 0, outputConfigsUsed = 0; + + pMasterScrPriv = rrGetScrPriv(pMasterScreen); + if (!pMasterScrPriv) + return; + + // Count the potential maximum of outputs that we will try to auto configure + for (i = 0; i < xf86NumGPUScreens; i++) { + pScreen = xf86GPUScreens[i]->pScreen; + if (pScreen->current_primary != pMasterScreen || !pScreen->is_output_secondary) + continue; + + pScrPriv = rrGetScrPriv(pScreen); + if (!pScrPriv) + continue; + + outputConfigsCount += pScrPriv->numOutputs; + } + + if (outputConfigsCount == 0) + return; + + outputConfigs = calloc(outputConfigsCount, sizeof(*outputConfigs)); + + screenWidth = 0; + screenHeight = 0; + + // Consider the master's own outputs/crtcs that were already configured + for (i = 0; i < pMasterScrPriv->numCrtcs; i++) { + if (!pMasterScrPriv->crtcs[i]->mode) + continue; + + screenWidth = max(screenWidth, pMasterScrPriv->crtcs[i]->x + pMasterScrPriv->crtcs[i]->mode->mode.width); + screenHeight = max(screenHeight, pMasterScrPriv->crtcs[i]->y + pMasterScrPriv->crtcs[i]->mode->mode.height); + } + + // Now add as many outputs from slave GPUs as we can next to it + for (i = 0; i < xf86NumGPUScreens; i++) { + pScreen = xf86GPUScreens[i]->pScreen; + if (pScreen->current_primary != pMasterScreen || !pScreen->is_output_secondary) + continue; + + pScrPriv = rrGetScrPriv(pScreen); + if (!pScrPriv) + continue; + + pUsedCrtcs = calloc(pScrPriv->numCrtcs, sizeof(*pUsedCrtcs)); + if (!pUsedCrtcs) + continue; + + usedCrtcsCount = 0; + + for (j = 0; j < pScrPriv->numOutputs; j++) { + pOutput = pScrPriv->outputs[j]; + + if (pOutput->connection != RR_Connected || + pOutput->nonDesktop || + pOutput->numModes == 0 || + pOutput->numCrtcs == 0) + continue; + + if (screenWidth + pOutput->modes[0]->mode.width > pMasterScrPriv->maxWidth || + screenHeight + pOutput->modes[0]->mode.height > pMasterScrPriv->maxHeight) + { + // It can't fit into the maximal size, skip + continue; + } + + for (k = 0; k < pOutput->numCrtcs; k++) { + pCrtc = pOutput->crtcs[k]; + for (l = 0; l < usedCrtcsCount; l++) { + if (pCrtc == pUsedCrtcs[l]) { + pCrtc = NULL; + break; + } + } + if (pCrtc) { + break; + } + } + + if (!pCrtc) { + // No more free CRTCs to setup this output, skip + continue; + } + + pUsedCrtcs[usedCrtcsCount] = pCrtc; + usedCrtcsCount++; + + assert(outputConfigsUsed < outputConfigsCount); + outputConfigs[outputConfigsUsed].pOutput = pOutput; + outputConfigs[outputConfigsUsed].pCrtc = pCrtc; + outputConfigs[outputConfigsUsed].x = screenWidth; + outputConfigs[outputConfigsUsed].y = 0; + outputConfigsUsed++; + + screenWidth += pOutput->modes[0]->mode.width; + screenHeight += pOutput->modes[0]->mode.height; + } + + free(pUsedCrtcs); + } + + if (outputConfigsUsed == 0) + goto out; + + if (screenWidth < pMasterScrPriv->minWidth) + screenWidth = pMasterScrPriv->minWidth; + if (screenHeight < pMasterScrPriv->minHeight) + screenHeight = pMasterScrPriv->minHeight; + + if (pMasterScrPriv->mmWidth > 0 && + pMasterScrPriv->mmHeight > 0 && + pMasterScrPriv->width > 0 && + pMasterScrPriv->height > 0) + { + // If the master screen already has some DPI, keep it + screenWidthMM = pMasterScrPriv->mmWidth * screenWidth / pMasterScreen->width; + screenHeightMM = pMasterScrPriv->mmHeight * screenHeight / pMasterScreen->height; + } else { + assert(outputConfigsUsed > 0); + // Otherwise use DPI of the first output + screenWidthMM = outputConfigs[0].pOutput->mmWidth * screenWidth / outputConfigs[0].pOutput->modes[0]->mode.width; + screenHeightMM = outputConfigs[0].pOutput->mmHeight * screenHeight / outputConfigs[0].pOutput->modes[0]->mode.height; + } + + if (!RRScreenSizeSet(pMasterScreen, screenWidth, screenHeight, screenWidthMM, screenHeightMM)) + goto out; + + for (i = 0; i < outputConfigsUsed; i++) { + RRCrtcSet( + outputConfigs[i].pCrtc, + outputConfigs[i].pOutput->modes[0], + outputConfigs[i].x, + outputConfigs[i].y, + RR_Rotate_0, + 1, + &outputConfigs[i].pOutput + ); + } + +out: + free(outputConfigs); +} + +static void +xf86AutoConfigProviderOutputs(CallbackListPtr *pcbl, void *data, void *call_data) +{ + int i; + + for (i = 0; i < xf86NumScreens; i++) { + xf86AutoConfigureProviderOutputsForMaster(xf86Screens[i]->pScreen); + } +} + static Bool xf86ScreenInit(ScreenPtr pScreen, int argc, char **argv) { diff --git a/include/dix.h b/include/dix.h index 0dcd09b65..ecc73d1d9 100644 --- a/include/dix.h +++ b/include/dix.h @@ -620,6 +620,8 @@ typedef struct { extern _X_EXPORT CallbackListPtr RootWindowFinalizeCallback; +extern _X_EXPORT CallbackListPtr RootWindowInitialized; + extern int XItoCoreType(int xi_type); extern Bool -- 2.25.1 ++++++ xorg-server-21.1.2.tar.xz -> xorg-server-21.1.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/ChangeLog new/xorg-server-21.1.3/ChangeLog --- old/xorg-server-21.1.2/ChangeLog 2021-12-15 14:52:25.000000000 +0100 +++ new/xorg-server-21.1.3/ChangeLog 2022-01-02 23:42:32.000000000 +0100 @@ -1,3 +1,86 @@ +commit 85397cc2efe8fa73461cd21afe700829b2eca768 +Author: Povilas Kanapickas <povi...@radix.lt> +Date: Mon Jan 3 00:23:30 2022 +0200 + + xserver 21.1.3 + + Signed-off-by: Povilas Kanapickas <povi...@radix.lt> + +commit 001feb6692b77254db6a4906a82fa1bdadfd7b85 +Author: Adam Jackson <a...@redhat.com> +Date: Tue Oct 26 11:46:37 2021 -0400 + + glx/dri: Filter out fbconfigs that don't have a supported pixmap format + + For depth 30 in particular it's not uncommon for the DDX to not have + a configured pixmap format. Since the client expects to back both + GLXPixmaps and GLXPbuffers with X Pixmaps, trying to use an x2rgb10 + fbconfig would fail along various paths to CreatePixmap. Filter these + fbconfigs out so the client can't ask for something that we know won't + work. + + (cherry picked from commit f6c070a1ac05801c52ae60efb7dc4b3142653b7d) + +commit 66890ca569291a53ea9cdc6ec19070173e522260 +Author: Jocelyn Falempe <jfale...@redhat.com> +Date: Fri Dec 17 10:18:25 2021 +0100 + + xf86/logind: fix missing call to vtenter if the platform device is not paused + + If there is one platform device, which is not paused nor resumed, + systemd_logind_vtenter() will never get called. + This break suspend/resume, and switching to VT on system with Nvidia + proprietary driver. + This is a regression introduced by f5bd039633fa83 + + So now call systemd_logind_vtenter() if there are no paused + platform devices. + + Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1271 + Fixes: f5bd0396 - xf86/logind: fix call systemd_logind_vtenter after receiving drm device resume + + Signed-off-by: Jocelyn Falempe <jfale...@redhat.com> + Tested-by: Olivier Fourdan <ofour...@redhat.com> + Reviewed-by: Hans de Goede <hdego...@redhat.com> + +commit fec0e2501b424ec6cfbf4c7983727acfafea0ccb +Author: Jocelyn Falempe <jfale...@redhat.com> +Date: Thu Dec 16 15:46:43 2021 +0100 + + xf86/logind: Fix compilation error when built without logind/platform bus + + This was introduced by commit 8eb1396d + + Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1269 + Fixes: da9d012a9 - xf86/logind: Fix drm_drop_master before vt_reldisp + + Signed-off-by: Jocelyn Falempe <jfale...@redhat.com> + Reviewed-by: Hans de Goede <hdego...@redhat.com> + +commit 8223a9d6d9ed2b9a4c1e6373f6ab854fdbda9ead +Author: Matthieu Herrb <matth...@herrb.eu> +Date: Tue Nov 16 23:38:46 2021 +0100 + + Convert more funcs to use InternalEvent. + + This fixes a crash when a DeviceEvent struct converted to + InteralEvent was beeing copied as InternalEvent (and thus + causing out of bounds reads) in ActivateGrabNoDelivery() + in events.c: 3876 *grabinfo->sync.event = *real_event; + + Possible fix for https://gitlab.freedesktop.org/xorg/xserver/-/issues/1253 + + Signed-off-by: Matthieu Herrb <matth...@herrb.eu> + (cherry picked from commit 5b8817a019845e1066c373022133985a0e2d718f) + +commit b27eaa72837eebe80adfe6c257a71a6b9eaf66ee +Author: nerdopolis <bluescreen_aven...@verizon.net> +Date: Fri Oct 8 18:15:29 2021 -0400 + + os: Try to discover the current seat with the XDG_SEAT var first + + (cherry picked from commit ca1dfdc9aa4b548de624d3a9af5147a998ba3d79) + commit 9852b29380673484aea25771a3e812c8e8a40393 Author: Povilas Kanapickas <povi...@radix.lt> Date: Wed Dec 15 15:46:09 2021 +0200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/Xi/exevents.c new/xorg-server-21.1.3/Xi/exevents.c --- old/xorg-server-21.1.2/Xi/exevents.c 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/Xi/exevents.c 2022-01-02 23:41:56.000000000 +0100 @@ -1901,7 +1901,7 @@ * nested) to clients. */ if (event->source_type == EVENT_SOURCE_FOCUS) return; - if (!grab && CheckDeviceGrabs(device, event, 0)) + if (!grab && CheckDeviceGrabs(device, ev, 0)) return; break; case ET_KeyRelease: @@ -1914,7 +1914,7 @@ if (b->map[key] == 0) /* there's no button 0 */ return; event->detail.button = b->map[key]; - if (!grab && CheckDeviceGrabs(device, event, 0)) { + if (!grab && CheckDeviceGrabs(device, ev, 0)) { /* if a passive grab was activated, the event has been sent * already */ return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/configure new/xorg-server-21.1.3/configure --- old/xorg-server-21.1.2/configure 2021-12-15 14:52:01.000000000 +0100 +++ new/xorg-server-21.1.3/configure 2022-01-02 23:42:07.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xorg-server 21.1.2. +# Generated by GNU Autoconf 2.69 for xorg-server 21.1.3. # # Report bugs to <https://gitlab.freedesktop.org/xorg/xserver/issues>. # @@ -651,8 +651,8 @@ # Identity of this package. PACKAGE_NAME='xorg-server' PACKAGE_TARNAME='xorg-server' -PACKAGE_VERSION='21.1.2' -PACKAGE_STRING='xorg-server 21.1.2' +PACKAGE_VERSION='21.1.3' +PACKAGE_STRING='xorg-server 21.1.3' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/xserver/issues' PACKAGE_URL='' @@ -1971,7 +1971,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xorg-server 21.1.2 to adapt to many kinds of systems. +\`configure' configures xorg-server 21.1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2042,7 +2042,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xorg-server 21.1.2:";; + short | recursive ) echo "Configuration of xorg-server 21.1.3:";; esac cat <<\_ACEOF @@ -2227,10 +2227,10 @@ org.x) --with-bundle-version=VERSION Version to use for X11.app's CFBundleVersion - (default: 21.1.2) + (default: 21.1.3) --with-bundle-version-string=VERSION Version to use for X11.app's - CFBundleShortVersionString (default: 21.1.2) + CFBundleShortVersionString (default: 21.1.3) --with-sparkle-feed-url=URL URL for the Sparkle feed (default: https://www.xquartz.org/releases/sparkle/release.xml) @@ -2443,7 +2443,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xorg-server configure 21.1.2 +xorg-server configure 21.1.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3152,7 +3152,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xorg-server $as_me 21.1.2, which was +It was created by xorg-server $as_me 21.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3500,7 +3500,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -RELEASE_DATE="2021-12-15" +RELEASE_DATE="2022-01-02" RELEASE_NAME="Caramel Ice Cream" @@ -4019,7 +4019,7 @@ # Define the identity of the package. PACKAGE='xorg-server' - VERSION='21.1.2' + VERSION='21.1.3' cat >>confdefs.h <<_ACEOF @@ -23526,7 +23526,7 @@ if test "${with_bundle_version+set}" = set; then : withval=$with_bundle_version; BUNDLE_VERSION="${withval}" else - BUNDLE_VERSION="21.1.2" + BUNDLE_VERSION="21.1.3" fi @@ -32078,7 +32078,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xorg-server $as_me 21.1.2, which was +This file was extended by xorg-server $as_me 21.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -32144,7 +32144,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xorg-server config.status 21.1.2 +xorg-server config.status 21.1.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/configure.ac new/xorg-server-21.1.3/configure.ac --- old/xorg-server-21.1.2/configure.ac 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/configure.ac 2022-01-02 23:41:56.000000000 +0100 @@ -26,8 +26,8 @@ dnl Process this file with autoconf to create configure. AC_PREREQ(2.60) -AC_INIT([xorg-server], 21.1.2, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server) -RELEASE_DATE="2021-12-15" +AC_INIT([xorg-server], 21.1.3, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server) +RELEASE_DATE="2022-01-02" RELEASE_NAME="Caramel Ice Cream" AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/dix/events.c new/xorg-server-21.1.3/dix/events.c --- old/xorg-server-21.1.2/dix/events.c 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/dix/events.c 2022-01-02 23:41:56.000000000 +0100 @@ -1191,7 +1191,7 @@ } } - eventlen = event->length; + eventlen = sizeof(InternalEvent); qe = malloc(sizeof(QdEventRec) + eventlen); if (!qe) @@ -1319,7 +1319,7 @@ syncEvents.replayDev = (DeviceIntPtr) NULL; - if (!CheckDeviceGrabs(replayDev, &event->device_event, + if (!CheckDeviceGrabs(replayDev, event, syncEvents.replayWin)) { if (IsTouchEvent(event)) { TouchPointInfoPtr ti = @@ -3027,7 +3027,7 @@ ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) { BOOL rc = FALSE; - DeviceEvent event; + InternalEvent event; if (dev->deviceGrab.grab) { if (!dev->deviceGrab.fromPassiveGrab || @@ -3042,16 +3042,16 @@ if (win == NoneWin || win == PointerRootWin) return FALSE; - event = (DeviceEvent) { - .header = ET_Internal, - .type = ET_FocusIn, - .length = sizeof(DeviceEvent), - .time = GetTimeInMillis(), - .deviceid = dev->id, - .sourceid = dev->id, - .detail.button = 0 + event = (InternalEvent) { + .device_event.header = ET_Internal, + .device_event.type = ET_FocusIn, + .device_event.length = sizeof(DeviceEvent), + .device_event.time = GetTimeInMillis(), + .device_event.deviceid = dev->id, + .device_event.sourceid = dev->id, + .device_event.detail.button = 0 }; - rc = (CheckPassiveGrabsOnWindow(win, dev, (InternalEvent *) &event, FALSE, + rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE, TRUE) != NULL); if (rc) DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab); @@ -3068,7 +3068,7 @@ ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) { BOOL rc = FALSE; - DeviceEvent event; + InternalEvent event; if (dev->deviceGrab.grab) { if (!dev->deviceGrab.fromPassiveGrab || @@ -3080,16 +3080,16 @@ (*dev->deviceGrab.DeactivateGrab) (dev); } - event = (DeviceEvent) { - .header = ET_Internal, - .type = ET_Enter, - .length = sizeof(DeviceEvent), - .time = GetTimeInMillis(), - .deviceid = dev->id, - .sourceid = dev->id, - .detail.button = 0 + event = (InternalEvent) { + .device_event.header = ET_Internal, + .device_event.type = ET_Enter, + .device_event.length = sizeof(DeviceEvent), + .device_event.time = GetTimeInMillis(), + .device_event.deviceid = dev->id, + .device_event.sourceid = dev->id, + .device_event.detail.button = 0 }; - rc = (CheckPassiveGrabsOnWindow(win, dev, (InternalEvent *) &event, FALSE, + rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE, TRUE) != NULL); if (rc) DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab); @@ -4141,14 +4141,15 @@ */ Bool -CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor) +CheckDeviceGrabs(DeviceIntPtr device, InternalEvent *ievent, WindowPtr ancestor) { int i; WindowPtr pWin = NULL; FocusClassPtr focus = - IsPointerEvent((InternalEvent *) event) ? NULL : device->focus; + IsPointerEvent(ievent) ? NULL : device->focus; BOOL sendCore = (IsMaster(device) && device->coreEvents); Bool ret = FALSE; + DeviceEvent *event = &ievent->device_event; if (event->type != ET_ButtonPress && event->type != ET_KeyPress) return FALSE; @@ -4171,7 +4172,7 @@ if (focus) { for (; i < focus->traceGood; i++) { pWin = focus->trace[i]; - if (CheckPassiveGrabsOnWindow(pWin, device, (InternalEvent *) event, + if (CheckPassiveGrabsOnWindow(pWin, device, ievent, sendCore, TRUE)) { ret = TRUE; goto out; @@ -4186,7 +4187,7 @@ for (; i < device->spriteInfo->sprite->spriteTraceGood; i++) { pWin = device->spriteInfo->sprite->spriteTrace[i]; - if (CheckPassiveGrabsOnWindow(pWin, device, (InternalEvent *) event, + if (CheckPassiveGrabsOnWindow(pWin, device, ievent, sendCore, TRUE)) { ret = TRUE; goto out; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/glx/glxdricommon.c new/xorg-server-21.1.3/glx/glxdricommon.c --- old/xorg-server-21.1.2/glx/glxdricommon.c 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/glx/glxdricommon.c 2022-01-02 23:41:56.000000000 +0100 @@ -115,6 +115,16 @@ | __DRI_ATTRIB_FLOAT_BIT)); } +static int +server_has_depth(int depth) +{ + int i; + for (i = 0; i < screenInfo.numPixmapFormats; i++) + if (screenInfo.formats[i].depth == depth) + return 1; + return 0; +} + static __GLXconfig * createModeFromConfig(const __DRIcoreExtension * core, const __DRIconfig * driConfig, @@ -178,6 +188,16 @@ if (!render_type_is_pbuffer_only(renderType)) drawableType |= GLX_WINDOW_BIT | GLX_PIXMAP_BIT; + /* Make sure we don't advertise things the server isn't configured for */ + if ((drawableType & (GLX_PBUFFER_BIT | GLX_PIXMAP_BIT)) && + !server_has_depth(config->config.rgbBits)) { + drawableType &= ~(GLX_PBUFFER_BIT | GLX_PIXMAP_BIT); + if (!drawableType) { + free(config); + return NULL; + } + } + config->config.next = NULL; config->config.visualType = visualType; config->config.renderType = renderType; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/hw/xfree86/common/xf86Events.c new/xorg-server-21.1.3/hw/xfree86/common/xf86Events.c --- old/xorg-server-21.1.2/hw/xfree86/common/xf86Events.c 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/hw/xfree86/common/xf86Events.c 2022-01-02 23:41:56.000000000 +0100 @@ -383,14 +383,7 @@ xf86GPUScreens[i]->LeaveVT(xf86GPUScreens[i]); if (systemd_logind_controls_session()) { - for (i = 0; i < xf86_num_platform_devices; i++) { - if (xf86_platform_devices[i].flags & XF86_PDEV_SERVER_FD) { - int major, minor; - major = xf86_platform_odev_attributes(i)->major; - minor = xf86_platform_odev_attributes(i)->minor; - systemd_logind_drop_master(major, minor); - } - } + systemd_logind_drop_master(); } if (!xf86VTSwitchAway()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/hw/xfree86/os-support/linux/systemd-logind.c new/xorg-server-21.1.3/hw/xfree86/os-support/linux/systemd-logind.c --- old/xorg-server-21.1.2/hw/xfree86/os-support/linux/systemd-logind.c 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/hw/xfree86/os-support/linux/systemd-logind.c 2022-01-02 23:41:56.000000000 +0100 @@ -308,13 +308,30 @@ * and ensure the drm_drop_master is done before * VT_RELDISP when switching VT */ -void systemd_logind_drop_master(int _major, int _minor) +void systemd_logind_drop_master(void) { - struct systemd_logind_info *info = &logind_info; - dbus_int32_t major = _major; - dbus_int32_t minor = _minor; + int i; + for (i = 0; i < xf86_num_platform_devices; i++) { + if (xf86_platform_devices[i].flags & XF86_PDEV_SERVER_FD) { + dbus_int32_t major, minor; + struct systemd_logind_info *info = &logind_info; + + xf86_platform_devices[i].flags |= XF86_PDEV_PAUSED; + major = xf86_platform_odev_attributes(i)->major; + minor = xf86_platform_odev_attributes(i)->minor; + systemd_logind_ack_pause(info, minor, major); + } + } +} - systemd_logind_ack_pause(info, minor, major); +static Bool are_platform_devices_resumed(void) { + int i; + for (i = 0; i < xf86_num_platform_devices; i++) { + if (xf86_platform_devices[i].flags & XF86_PDEV_PAUSED) { + return FALSE; + } + } + return TRUE; } static DBusHandlerResult @@ -410,13 +427,11 @@ if (pdev) { pdev->flags &= ~XF86_PDEV_PAUSED; - systemd_logind_vtenter(); } else systemd_logind_set_input_fd_for_all_devs(major, minor, fd, info->vt_active); - - /* Always call vtenter(), only if there are only legacy video devs */ - if (!xf86_num_platform_devices) + /* Call vtenter if all platform devices are resumed, or if there are no platform device */ + if (are_platform_devices_resumed()) systemd_logind_vtenter(); } return DBUS_HANDLER_RESULT_HANDLED; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/include/dix.h new/xorg-server-21.1.3/include/dix.h --- old/xorg-server-21.1.2/include/dix.h 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/include/dix.h 2022-01-02 23:41:56.000000000 +0100 @@ -458,7 +458,7 @@ extern Bool CheckDeviceGrabs(DeviceIntPtr /* device */ , - DeviceEvent * /* event */ , + InternalEvent * /* event */ , WindowPtr /* ancestor */ ); extern void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/include/systemd-logind.h new/xorg-server-21.1.3/include/systemd-logind.h --- old/xorg-server-21.1.2/include/systemd-logind.h 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/include/systemd-logind.h 2022-01-02 23:41:56.000000000 +0100 @@ -33,7 +33,7 @@ void systemd_logind_release_fd(int major, int minor, int fd); int systemd_logind_controls_session(void); void systemd_logind_vtenter(void); -void systemd_logind_drop_master(int major, int minor); +void systemd_logind_drop_master(void); #else #define systemd_logind_init() #define systemd_logind_fini() @@ -41,7 +41,7 @@ #define systemd_logind_release_fd(major, minor, fd) close(fd) #define systemd_logind_controls_session() 0 #define systemd_logind_vtenter() -#define systemd_logind_drop_master(major, minor) +#define systemd_logind_drop_master() #endif #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xorg-server-21.1.2/meson.build new/xorg-server-21.1.3/meson.build --- old/xorg-server-21.1.2/meson.build 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/meson.build 2022-01-02 23:41:56.000000000 +0100 @@ -3,10 +3,10 @@ 'buildtype=debugoptimized', 'c_std=gnu99', ], - version: '21.1.2', + version: '21.1.3', meson_version: '>= 0.47.0', ) -release_date = '2021-12-15' +release_date = '2022-01-02' 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/xorg-server-21.1.2/os/utils.c new/xorg-server-21.1.3/os/utils.c --- old/xorg-server-21.1.2/os/utils.c 2021-12-15 14:51:50.000000000 +0100 +++ new/xorg-server-21.1.3/os/utils.c 2022-01-02 23:41:56.000000000 +0100 @@ -681,6 +681,7 @@ ErrorF("Failed to disable listen for %s transport", defaultNoListenList[i]); } + SeatId = getenv("XDG_SEAT"); for (i = 1; i < argc; i++) { /* call ddx first, so it can peek/override if it wants */