diff --git a/.gitignore b/.gitignore index ae892e8..29790d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,36 +1,3 @@ -xorg-server-1.9.1.tar.bz2 -/xorg-server-20101125.tar.xz -/xorg-server-20101201.tar.xz -/xorg-server-1.10.0.tar.bz2 -/xorg-server-20110418.tar.xz -/xorg-server-20110510.tar.xz -/xorg-server-20110818.tar.xz -/xorg-server-1.11.0.tar.bz2 -/xorg-server-1.11.1.tar.bz2 -/xorg-server-20111109.tar.xz -/xorg-server-20120103.tar.xz -/xorg-server-20120124.tar.xz -/xorg-server-20120215.tar.xz -/xorg-server-1.12.0.tar.bz2 -/xorg-server-1.12.1.tar.bz2 -/xorg-server-1.12.2.tar.bz2 -/xorg-server-1.12.3.tar.bz2 -/xorg-server-20120717.tar.xz -/xorg-server-20120726.tar.xz -/xorg-server-20120808.tar.xz -/xorg-server-20120822.tar.xz -/xorg-server-1.13.0.tar.bz2 -/xorg-server-1.13.1.tar.bz2 -/xorg-server-20130109.tar.xz -/xorg-server-20130215.tar.xz -/xorg-server-1.14.0.tar.bz2 -/xorg-server-1.14.1.tar.bz2 -/xorg-server-1.14.1.901.tar.bz2 -/xorg-server-1.14.2.tar.bz2 -/xorg-server-1.14.3.tar.bz2 -/xorg-server-1.14.99.3.tar.bz2 -/xorg-server-1.14.99.901.tar.bz2 -/xorg-server-1.14.99.902.tar.bz2 *.bz2 *.xz -/xorg-x11-server-1.15.0-1.fc21.src.rpm +*.gz diff --git a/0001-Always-install-vbe-and-int10-sdk-headers.patch b/0001-Always-install-vbe-and-int10-sdk-headers.patch deleted file mode 100644 index c613eb8..0000000 --- a/0001-Always-install-vbe-and-int10-sdk-headers.patch +++ /dev/null @@ -1,37 +0,0 @@ -From e96a83d9b1b5a52a41213c7a4840dc96b4f5b06f Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Wed, 15 Aug 2012 12:35:21 -0400 -Subject: [PATCH] Always install vbe and int10 sdk headers - -Signed-off-by: Adam Jackson ---- - hw/xfree86/Makefile.am | 12 ++---------- - 1 file changed, 2 insertions(+), 10 deletions(-) - -diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am -index b876b79..a170b58 100644 ---- a/hw/xfree86/Makefile.am -+++ b/hw/xfree86/Makefile.am -@@ -26,17 +26,9 @@ if VGAHW - VGAHW_SUBDIR = vgahw - endif - --if VBE --VBE_SUBDIR = vbe --endif -- --if INT10MODULE --INT10_SUBDIR = int10 --endif -- --SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ -+SUBDIRS = common ddc x86emu int10 os-support parser \ - ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ -- $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods xkb \ -+ $(DRI2_SUBDIR) . vbe i2c dixmods xkb \ - fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \ - $(GLAMOR_EGL_SUBDIR) drivers - --- -2.13.6 - diff --git a/0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch b/0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch index b0a44e4..2134a44 100644 --- a/0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch +++ b/0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch @@ -1,4 +1,4 @@ -From 27043630ebb54fd1915c5d1814ab62079ca3eca9 Mon Sep 17 00:00:00 2001 +From acf5a0100c98a040e5e07a79ecf4a83627da770e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 23 Mar 2017 12:54:07 +0100 Subject: [PATCH xserver] xf86: dri2: Use va_gl as vdpau_driver for Intel i965 @@ -22,15 +22,15 @@ BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1413733 Cc: kwizart@gmail.com Signed-off-by: Hans de Goede --- - hw/xfree86/dri2/dri2.c | 36 +++++++++++++++++++---------- - hw/xfree86/dri2/pci_ids/pci_id_driver_map.h | 21 +++++++++-------- - 2 files changed, 35 insertions(+), 22 deletions(-) + hw/xfree86/dri2/dri2.c | 31 +++++++++++++-------- + hw/xfree86/dri2/pci_ids/pci_id_driver_map.h | 21 +++++++------- + 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c -index 2165603..d0366746 100644 +index 6619e3aa7..1f8ad14bc 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c -@@ -1437,14 +1437,19 @@ get_prime_id(void) +@@ -1437,14 +1437,18 @@ get_prime_id(void) #include "pci_ids/pci_id_driver_map.h" @@ -41,24 +41,18 @@ index 2165603..d0366746 100644 + const char **dri_driver_ret, + const char **vdpau_driver_ret) { - ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); - EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]); - struct pci_device *pdev = NULL; + #ifdef WITH_LIBDRM int i, j; +- char *driver = NULL; + drmDevicePtr dev; + *dri_driver_ret = NULL; + *vdpau_driver_ret = NULL; + - if (pEnt) - pdev = xf86GetPciInfoForEntity(pEnt->index); - -@@ -1454,30 +1459,37 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) - */ - if (!pdev) { - drmVersionPtr version = drmGetVersion(info->fd); -- char *kernel_driver; - - if (!version) { + /* For non-PCI devices and drmGetDevice fail, just assume that + * the 3D driver is named the same as the kernel driver. This is + * currently true for vc4 and msm (freedreno). +@@ -1454,12 +1458,14 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] Couldn't drmGetVersion() on non-PCI device, " "no driver name found.\n"); @@ -66,61 +60,61 @@ index 2165603..d0366746 100644 + return; } -- kernel_driver = strndup(version->name, version->name_len); +- driver = strndup(version->name, version->name_len); + /* FIXME this gets leaked */ + *dri_driver_ret = strndup(version->name, version->name_len); + *vdpau_driver_ret = *dri_driver_ret; drmFreeVersion(version); -- return kernel_driver; +- return driver; + return; } for (i = 0; driver_map[i].driver; i++) { - if (pdev->vendor_id != driver_map[i].vendor_id) +@@ -1467,13 +1473,15 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) continue; -- if (driver_map[i].num_chips_ids == -1) -- return strdup(driver_map[i].driver); -+ if (driver_map[i].num_chips_ids == -1) { + if (driver_map[i].num_chips_ids == -1) { +- driver = strdup(driver_map[i].driver); + *dri_driver_ret = driver_map[i].driver; + *vdpau_driver_ret = driver_map[i].vdpau_driver; -+ return; -+ } + goto out; + } for (j = 0; j < driver_map[i].num_chips_ids; j++) { -- if (driver_map[i].chip_ids[j] == pdev->device_id) -- return strdup(driver_map[i].driver); -+ if (driver_map[i].chip_ids[j] == pdev->device_id) { + if (driver_map[i].chip_ids[j] == dev->deviceinfo.pci->device_id) { +- driver = strdup(driver_map[i].driver); + *dri_driver_ret = driver_map[i].driver; + *vdpau_driver_ret = driver_map[i].vdpau_driver; -+ return; -+ } + goto out; + } } - } - -@@ -1485,7 +1497,6 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) - "[DRI2] No driver mapping found for PCI device " - "0x%04x / 0x%04x\n", - pdev->vendor_id, pdev->device_id); +@@ -1485,9 +1493,9 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) + dev->deviceinfo.pci->vendor_id, dev->deviceinfo.pci->device_id); + out: + drmFreeDevice(&dev); +- return driver; + #else - return NULL; ++ *dri_driver_ret = NULL; ++ *vdpau_driver_ret = NULL; + #endif } - Bool -@@ -1606,7 +1617,8 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) - if (info->driverName) { - ds->driverNames[0] = info->driverName; +@@ -1604,7 +1612,8 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) } else { + /* FIXME dri2_probe_driver_name() returns a strdup-ed string, + * currently this gets leaked */ - ds->driverNames[0] = ds->driverNames[1] = dri2_probe_driver_name(pScreen, info); + dri2_probe_driver_name(pScreen, info, + &ds->driverNames[0], &ds->driverNames[1]); if (!ds->driverNames[0]) return FALSE; - } + diff --git a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h -index da7ea1c..7036d10 100644 +index da7ea1c1e..7036d1003 100644 --- a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h +++ b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h -@@ -66,21 +66,22 @@ static const int vmwgfx_chip_ids[] = { +@@ -60,23 +60,24 @@ static const int vmwgfx_chip_ids[] = { static const struct { int vendor_id; const char *driver; @@ -130,8 +124,10 @@ index da7ea1c..7036d10 100644 } driver_map[] = { - { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, - { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, +- { 0x8086, "i965", NULL, -1 }, + { 0x8086, "i915", "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, + { 0x8086, "i965", "va_gl", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, ++ { 0x8086, "i965", "va_gl", NULL, -1 }, #ifndef DRIVER_MAP_GALLIUM_ONLY - { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) }, - { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) }, @@ -140,19 +136,18 @@ index da7ea1c..7036d10 100644 #endif - { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, - { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, -- { 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) }, +- { 0x1002, "radeonsi", NULL, -1 }, - { 0x10de, "nouveau", NULL, -1 }, - { 0x1af4, "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) }, - { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) }, +- { 0x0000, NULL, NULL, 0 }, + { 0x1002, "r300", "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, -+ { 0x1002, "r600","r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, -+ { 0x1002, "radeonsi", "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) }, ++ { 0x1002, "r600", "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, ++ { 0x1002, "radeonsi", "radeonsi", NULL, -1 }, + { 0x10de, "nouveau", "nouveau", NULL, -1 }, + { 0x1af4, "virtio_gpu", "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) }, + { 0x15ad, "vmwgfx", "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) }, - { 0x0000, NULL, NULL, 0 }, ++ { 0x0000, NULL, NULL, NULL, 0 }, }; --- -2.9.3 - + #endif /* _PCI_ID_DRIVER_MAP_H_ */ diff --git a/0001-xfree86-Free-devlist-returned-by-xf86MatchDevice.patch b/0001-xfree86-Free-devlist-returned-by-xf86MatchDevice.patch deleted file mode 100644 index 36a3730..0000000 --- a/0001-xfree86-Free-devlist-returned-by-xf86MatchDevice.patch +++ /dev/null @@ -1,39 +0,0 @@ -From c57c1e53ea3d76ebba5b2a23b7260817d3e6b921 Mon Sep 17 00:00:00 2001 -From: Hans De Goede -Date: Mon, 12 Dec 2016 17:03:12 +0100 -Subject: [PATCH xserver 1/6] xfree86: Free devlist returned by xf86MatchDevice - -xf86MatchDevice returns a dynamically allocated list of GDevPtr-s, -free this when we're done with it. - -Reviewed-by: Adam Jackson -Signed-off-by: Hans de Goede ---- - hw/xfree86/common/xf86platformBus.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index 063e81c..16d934f 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -479,6 +479,8 @@ xf86platformProbeDev(DriverPtr drvp) - isGPUDevice(devList[i]) ? PLATFORM_PROBE_GPU_SCREEN : 0); - } - -+ free(devList); -+ - return foundScreen; - } - -@@ -505,6 +507,8 @@ xf86platformAddGPUDevices(DriverPtr drvp) - } - } - -+ free(devList); -+ - return foundScreen; - } - --- -2.9.3 - diff --git a/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch b/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch index 1b1306e..be83429 100644 --- a/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch +++ b/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch @@ -24,7 +24,7 @@ index 8158c2b62..78d1c947d 100644 @@ -1190,6 +1191,25 @@ xf86VideoPtrToDriverList(struct pci_device *dev, int idx = 0; - #ifdef __linux__ + #if defined(__linux__) || defined(__NetBSD__) + char busid[32]; + int fd; + diff --git a/0001-xwayland-Depend-on-wayland-protocols-to-build-tablet.patch b/0001-xwayland-Depend-on-wayland-protocols-to-build-tablet.patch deleted file mode 100644 index e16b405..0000000 --- a/0001-xwayland-Depend-on-wayland-protocols-to-build-tablet.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 7f22271ca7ace43f6fa1168a2acea9af6f2d5896 Mon Sep 17 00:00:00 2001 -From: Jason Gerecke -Date: Thu, 13 Oct 2016 10:39:46 -0700 -Subject: [PATCH xserver 01/12] xwayland: Depend on wayland-protocols to build - tablet protocol headers - -Signed-off-by: Jason Gerecke -Signed-off-by: Carlos Garnacho -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Acked-by: Ping Cheng -(cherry picked from commit 89c841915ac4fba6d2a5ad0051c778f1a76ffbf3) ---- - configure.ac | 2 +- - hw/xwayland/Makefile.am | 9 ++++++++- - hw/xwayland/xwayland-input.c | 1 + - 3 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e6c5b35de..d34e10538 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2503,7 +2503,7 @@ AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) - - dnl Xwayland DDX - --XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.1 $LIBDRM epoxy" -+XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.5 $LIBDRM epoxy" - if test "x$XF86VIDMODE" = xyes; then - XWAYLANDMODULES="$XWAYLANDMODULES $VIDMODEPROTO" - fi -diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am -index a3c9fce48..e376f09dd 100644 ---- a/hw/xwayland/Makefile.am -+++ b/hw/xwayland/Makefile.am -@@ -56,7 +56,9 @@ Xwayland_built_sources += \ - relative-pointer-unstable-v1-client-protocol.h \ - relative-pointer-unstable-v1-protocol.c \ - pointer-constraints-unstable-v1-client-protocol.h \ -- pointer-constraints-unstable-v1-protocol.c -+ pointer-constraints-unstable-v1-protocol.c \ -+ tablet-unstable-v2-client-protocol.h \ -+ tablet-unstable-v2-protocol.c - - nodist_Xwayland_SOURCES = $(Xwayland_built_sources) - CLEANFILES = $(Xwayland_built_sources) -@@ -79,6 +81,11 @@ pointer-constraints-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstab - pointer-constraints-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml - $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@ - -+tablet-unstable-v2-protocol.c: $(WAYLAND_PROTOCOLS_DATADIR)/unstable/tablet/tablet-unstable-v2.xml -+ $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@ -+tablet-unstable-v2-client-protocol.h: $(WAYLAND_PROTOCOLS_DATADIR)/unstable/tablet/tablet-unstable-v2.xml -+ $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@ -+ - %-protocol.c : %.xml - $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@ - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index f2564d5d3..8fdc875ea 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include "tablet-unstable-v2-client-protocol.h" - - /* Copied from mipointer.c */ - #define MIPOINTER(dev) \ --- -2.13.5 - diff --git a/0002-xfree86-Make-OutputClassMatches-take-a-xf86_platform.patch b/0002-xfree86-Make-OutputClassMatches-take-a-xf86_platform.patch deleted file mode 100644 index 89ce17c..0000000 --- a/0002-xfree86-Make-OutputClassMatches-take-a-xf86_platform.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 08b84d72878e43401e99059c3c926dfa42a360c3 Mon Sep 17 00:00:00 2001 -From: Hans De Goede -Date: Mon, 12 Dec 2016 17:03:13 +0100 -Subject: [PATCH xserver 2/6] xfree86: Make OutputClassMatches take a - xf86_platform_device - -Make OutputClassMatches directly take a xf86_platform_device as argument, -rather then an index into xf86_platform_devices. This makes things -easier for callers which already have a xf86_platform_device pointer. - -Reviewed-by: Adam Jackson -Signed-off-by: Hans de Goede ---- - hw/xfree86/common/xf86platformBus.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index 16d934f..25a9040 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -214,9 +214,10 @@ MatchToken(const char *value, struct xorg_list *patterns, - } - - static Bool --OutputClassMatches(const XF86ConfOutputClassPtr oclass, int index) -+OutputClassMatches(const XF86ConfOutputClassPtr oclass, -+ struct xf86_platform_device *dev) - { -- char *driver = xf86_platform_odev_attributes(index)->driver; -+ char *driver = dev->attribs->driver; - - if (!MatchToken(driver, &oclass->match_driver, strcmp)) - return FALSE; -@@ -234,7 +235,7 @@ xf86OutputClassDriverList(int index, char *matches[], int nmatches) - return 0; - - for (cl = xf86configptr->conf_outputclass_lst; cl; cl = cl->list.next) { -- if (OutputClassMatches(cl, index)) { -+ if (OutputClassMatches(cl, &xf86_platform_devices[index])) { - char *path = xf86_platform_odev_attributes(index)->path; - - xf86Msg(X_INFO, "Applying OutputClass \"%s\" to %s\n", --- -2.9.3 - diff --git a/0002-xwayland-Bind-to-wp_tablet_manager-if-available-and-.patch b/0002-xwayland-Bind-to-wp_tablet_manager-if-available-and-.patch deleted file mode 100644 index 9e750cb..0000000 --- a/0002-xwayland-Bind-to-wp_tablet_manager-if-available-and-.patch +++ /dev/null @@ -1,166 +0,0 @@ -From 8dcc03fb4a5db18fb52377ee578a2a673d691a1e Mon Sep 17 00:00:00 2001 -From: Jason Gerecke -Date: Fri, 15 Jan 2016 17:29:37 -0800 -Subject: [PATCH xserver 02/12] xwayland: Bind to wp_tablet_manager if - available and get its seats - -If we're notified about the existence of the wp_tablet_manager interface, -we bind to it so that we can make use of any tablets that are (or later -become) available. For each seat that exists or comes into existance at -a later point, obtain the associated tablet_seat. - -Signed-off-by: Jason Gerecke -Signed-off-by: Carlos Garnacho -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Acked-by: Ping Cheng -(cherry picked from commit 7d48b758a601ce0252ebd21297a7c42263adfaaf) ---- - hw/xwayland/xwayland-input.c | 59 ++++++++++++++++++++++++++++++++++++++++++++ - hw/xwayland/xwayland.c | 2 ++ - hw/xwayland/xwayland.h | 4 +++ - 3 files changed, 65 insertions(+) - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index 8fdc875ea..1d2be978e 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -63,6 +63,12 @@ static void - xwl_seat_destroy_confined_pointer(struct xwl_seat *xwl_seat); - - static void -+init_tablet_manager_seat(struct xwl_screen *xwl_screen, -+ struct xwl_seat *xwl_seat); -+static void -+release_tablet_manager_seat(struct xwl_seat *xwl_seat); -+ -+static void - xwl_pointer_control(DeviceIntPtr device, PtrCtrl *ctrl) - { - /* Nothing to do, dix handles all settings */ -@@ -1147,6 +1153,9 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version - - xwl_seat->cursor = wl_compositor_create_surface(xwl_screen->compositor); - wl_seat_add_listener(xwl_seat->seat, &seat_listener, xwl_seat); -+ -+ init_tablet_manager_seat(xwl_screen, xwl_seat); -+ - wl_array_init(&xwl_seat->keys); - - xorg_list_init(&xwl_seat->touches); -@@ -1170,6 +1179,8 @@ xwl_seat_destroy(struct xwl_seat *xwl_seat) - free (p); - } - -+ release_tablet_manager_seat(xwl_seat); -+ - wl_seat_destroy(xwl_seat->seat); - wl_surface_destroy(xwl_seat->cursor); - if (xwl_seat->cursor_frame_cb) -@@ -1178,6 +1189,52 @@ xwl_seat_destroy(struct xwl_seat *xwl_seat) - free(xwl_seat); - } - -+ -+static void -+init_tablet_manager_seat(struct xwl_screen *xwl_screen, -+ struct xwl_seat *xwl_seat) -+{ -+ if (!xwl_screen->tablet_manager) -+ return; -+ -+ xwl_seat->tablet_seat = -+ zwp_tablet_manager_v2_get_tablet_seat(xwl_screen->tablet_manager, -+ xwl_seat->seat); -+} -+ -+static void -+release_tablet_manager_seat(struct xwl_seat *xwl_seat) -+{ -+ if (xwl_seat->tablet_seat) { -+ zwp_tablet_seat_v2_destroy(xwl_seat->tablet_seat); -+ xwl_seat->tablet_seat = NULL; -+ } -+} -+ -+static void -+init_tablet_manager(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version) -+{ -+ struct xwl_seat *xwl_seat; -+ -+ xwl_screen->tablet_manager = wl_registry_bind(xwl_screen->registry, -+ id, -+ &zwp_tablet_manager_v2_interface, -+ min(version,1)); -+ -+ xorg_list_for_each_entry(xwl_seat, &xwl_screen->seat_list, link) { -+ init_tablet_manager_seat(xwl_screen, xwl_seat); -+ } -+} -+ -+void -+xwl_screen_release_tablet_manager(struct xwl_screen *xwl_screen) -+{ -+ if (xwl_screen->tablet_manager) { -+ zwp_tablet_manager_v2_destroy(xwl_screen->tablet_manager); -+ xwl_screen->tablet_manager = NULL; -+ } -+} -+ - static void - init_relative_pointer_manager(struct xwl_screen *xwl_screen, - uint32_t id, uint32_t version) -@@ -1211,6 +1268,8 @@ input_handler(void *data, struct wl_registry *registry, uint32_t id, - init_relative_pointer_manager(xwl_screen, id, version); - } else if (strcmp(interface, "zwp_pointer_constraints_v1") == 0) { - init_pointer_constraints(xwl_screen, id, version); -+ } else if (strcmp(interface, "zwp_tablet_manager_v2") == 0) { -+ init_tablet_manager(xwl_screen, id, version); - } - } - -diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c -index 939f3392c..fa7b81c7a 100644 ---- a/hw/xwayland/xwayland.c -+++ b/hw/xwayland/xwayland.c -@@ -130,6 +130,8 @@ xwl_close_screen(ScreenPtr screen) - &xwl_screen->seat_list, link) - xwl_seat_destroy(xwl_seat); - -+ xwl_screen_release_tablet_manager(xwl_screen); -+ - RemoveNotifyFd(xwl_screen->wayland_fd); - - wl_display_disconnect(xwl_screen->display); -diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h -index 5e5624be0..2752d731c 100644 ---- a/hw/xwayland/xwayland.h -+++ b/hw/xwayland/xwayland.h -@@ -76,6 +76,7 @@ struct xwl_screen { - struct wl_registry *registry; - struct wl_registry *input_registry; - struct wl_compositor *compositor; -+ struct zwp_tablet_manager_v2 *tablet_manager; - struct wl_shm *shm; - struct wl_shell *shell; - struct zwp_relative_pointer_manager_v1 *relative_pointer_manager; -@@ -137,6 +138,7 @@ struct xwl_seat { - struct zwp_relative_pointer_v1 *wp_relative_pointer; - struct wl_keyboard *wl_keyboard; - struct wl_touch *wl_touch; -+ struct zwp_tablet_seat_v2 *tablet_seat; - struct wl_array keys; - struct xwl_window *focus_window; - uint32_t id; -@@ -241,6 +243,8 @@ Bool xwl_screen_init_glamor(struct xwl_screen *xwl_screen, - uint32_t id, uint32_t version); - struct wl_buffer *xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap); - -+void xwl_screen_release_tablet_manager(struct xwl_screen *xwl_screen); -+ - #ifdef XV - /* glamor Xv Adaptor */ - Bool xwl_glamor_xv_init(ScreenPtr pScreen); --- -2.13.5 - diff --git a/0003-xfree86-Add-options-support-for-OutputClass-Options.patch b/0003-xfree86-Add-options-support-for-OutputClass-Options.patch deleted file mode 100644 index b18f9b9..0000000 --- a/0003-xfree86-Add-options-support-for-OutputClass-Options.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 9cd3cc75269d9196898487b5712ee47b8291e077 Mon Sep 17 00:00:00 2001 -From: Hans De Goede -Date: Mon, 12 Dec 2016 17:03:14 +0100 -Subject: [PATCH xserver 3/6] xfree86: Add options support for OutputClass - Options - -Add support for setting options in OutputClass Sections and having these -applied to any matching output devices. - -Reviewed-by: Adam Jackson -Signed-off-by: Hans de Goede ---- - hw/xfree86/common/xf86Option.c | 5 ++++- - hw/xfree86/common/xf86platformBus.c | 42 +++++++++++++++++++++++++++++++++++++ - hw/xfree86/common/xf86platformBus.h | 2 ++ - hw/xfree86/man/xorg.conf.man | 10 +++++++++ - hw/xfree86/parser/OutputClass.c | 6 ++++++ - hw/xfree86/parser/xf86Parser.h | 1 + - 6 files changed, 65 insertions(+), 1 deletion(-) - -diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c -index 0e8bc1f..929724d 100644 ---- a/hw/xfree86/common/xf86Option.c -+++ b/hw/xfree86/common/xf86Option.c -@@ -44,6 +44,7 @@ - #include "xf86Xinput.h" - #include "xf86Optrec.h" - #include "xf86Parser.h" -+#include "xf86platformBus.h" /* For OutputClass functions */ - #include "optionstr.h" - - static Bool ParseOptionValue(int scrnIndex, XF86OptionPtr options, -@@ -64,7 +65,7 @@ static Bool ParseOptionValue(int scrnIndex, XF86OptionPtr options, - * - * The order of precedence for options is: - * -- * extraOpts, display, confScreen, monitor, device -+ * extraOpts, display, confScreen, monitor, device, outputClassOptions - */ - - void -@@ -79,6 +80,8 @@ xf86CollectOptions(ScrnInfoPtr pScrn, XF86OptionPtr extraOpts) - pScrn->options = NULL; - - for (i = pScrn->numEntities - 1; i >= 0; i--) { -+ xf86MergeOutputClassOptions(pScrn->entityList[i], &pScrn->options); -+ - device = xf86GetDevFromEntity(pScrn->entityList[i], - pScrn->entityInstanceList[i]); - if (device && device->options) { -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index 25a9040..a698c6c 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -310,6 +310,48 @@ xf86platformProbe(void) - return 0; - } - -+void -+xf86MergeOutputClassOptions(int entityIndex, void **options) -+{ -+ const EntityPtr entity = xf86Entities[entityIndex]; -+ struct xf86_platform_device *dev = NULL; -+ XF86ConfOutputClassPtr cl; -+ XF86OptionPtr classopts; -+ int i = 0; -+ -+ switch (entity->bus.type) { -+ case BUS_PLATFORM: -+ dev = entity->bus.id.plat; -+ break; -+ case BUS_PCI: -+ for (i = 0; i < xf86_num_platform_devices; i++) { -+ if (MATCH_PCI_DEVICES(xf86_platform_devices[i].pdev, -+ entity->bus.id.pci)) { -+ dev = &xf86_platform_devices[i]; -+ break; -+ } -+ } -+ break; -+ default: -+ xf86Msg(X_DEBUG, "xf86MergeOutputClassOptions unsupported bus type %d\n", -+ entity->bus.type); -+ } -+ -+ if (!dev) -+ return; -+ -+ for (cl = xf86configptr->conf_outputclass_lst; cl; cl = cl->list.next) { -+ if (!OutputClassMatches(cl, dev) || !cl->option_lst) -+ continue; -+ -+ xf86Msg(X_INFO, "Applying OutputClass \"%s\" options to %s\n", -+ cl->identifier, dev->attribs->path); -+ -+ classopts = xf86optionListDup(cl->option_lst); -+ *options = xf86optionListMerge(*options, classopts); -+ } -+} -+ - static int - xf86ClaimPlatformSlot(struct xf86_platform_device * d, DriverPtr drvp, - int chipset, GDevPtr dev, Bool active) -diff --git a/hw/xfree86/common/xf86platformBus.h b/hw/xfree86/common/xf86platformBus.h -index 0f5c0ef..70d9ec8 100644 ---- a/hw/xfree86/common/xf86platformBus.h -+++ b/hw/xfree86/common/xf86platformBus.h -@@ -42,6 +42,7 @@ struct xf86_platform_device { - int xf86platformProbe(void); - int xf86platformProbeDev(DriverPtr drvp); - int xf86platformAddGPUDevices(DriverPtr drvp); -+void xf86MergeOutputClassOptions(int entityIndex, void **options); - - extern int xf86_num_platform_devices; - extern struct xf86_platform_device *xf86_platform_devices; -@@ -161,6 +162,7 @@ extern void xf86platformPrimary(void); - #else - - static inline int xf86platformAddGPUDevices(DriverPtr drvp) { return FALSE; } -+static inline void xf86MergeOutputClassOptions(int index, void **options) {} - - #endif - -diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man -index 7d0c524..8928a53 100644 ---- a/hw/xfree86/man/xorg.conf.man -+++ b/hw/xfree86/man/xorg.conf.man -@@ -1280,6 +1280,16 @@ For example: - Check the case-sensitive string - .RI \*q matchdriver \*q - against the kernel driver of the device. -+.PP -+When an output device has been matched to the -+.B OutputClass -+section, any -+.B Option -+entries are applied to the device. See the -+.B Device -+section below for a description of the remaining -+.B Option -+entries. - .SH "DEVICE SECTION" - The config file may have multiple - .B Device -diff --git a/hw/xfree86/parser/OutputClass.c b/hw/xfree86/parser/OutputClass.c -index 8064e0c..f813ee6 100644 ---- a/hw/xfree86/parser/OutputClass.c -+++ b/hw/xfree86/parser/OutputClass.c -@@ -36,6 +36,7 @@ static const xf86ConfigSymTabRec OutputClassTab[] = { - {ENDSECTION, "endsection"}, - {IDENTIFIER, "identifier"}, - {DRIVER, "driver"}, -+ {OPTION, "option"}, - {MATCH_DRIVER, "matchdriver"}, - {-1, ""}, - }; -@@ -60,6 +61,8 @@ xf86freeOutputClassList(XF86ConfOutputClassPtr ptr) - free(group); - } - -+ xf86optionListFree(ptr->option_lst); -+ - prev = ptr; - ptr = ptr->list.next; - free(prev); -@@ -112,6 +115,9 @@ xf86parseOutputClassSection(void) - else - ptr->driver = xf86_lex_val.str; - break; -+ case OPTION: -+ ptr->option_lst = xf86parseOption(ptr->option_lst); -+ break; - case MATCH_DRIVER: - if (xf86getSubToken(&(ptr->comment)) != STRING) - Error(QUOTE_MSG, "MatchDriver"); -diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h -index 9c4b403..897edab 100644 ---- a/hw/xfree86/parser/xf86Parser.h -+++ b/hw/xfree86/parser/xf86Parser.h -@@ -338,6 +338,7 @@ typedef struct { - char *identifier; - char *driver; - struct xorg_list match_driver; -+ XF86OptionPtr option_lst; - char *comment; - } XF86ConfOutputClassRec, *XF86ConfOutputClassPtr; - --- -2.9.3 - diff --git a/0003-xwayland-Listen-for-wp_tablet_seat-events.patch b/0003-xwayland-Listen-for-wp_tablet_seat-events.patch deleted file mode 100644 index 308331f..0000000 --- a/0003-xwayland-Listen-for-wp_tablet_seat-events.patch +++ /dev/null @@ -1,173 +0,0 @@ -From 243eadc7979e35756a4f0e349ee97bbbd3a268c3 Mon Sep 17 00:00:00 2001 -From: Jason Gerecke -Date: Fri, 14 Oct 2016 14:50:18 -0700 -Subject: [PATCH xserver 03/12] xwayland: Listen for wp_tablet_seat events - -The wp_tablet_seat interface provides us with notifications as tablets, -tools, and pads are connected to the system. Add listener functions and -store references to the obtained devices. - -Signed-off-by: Jason Gerecke -Signed-off-by: Carlos Garnacho -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Acked-by: Ping Cheng -(cherry picked from commit 47c4415912b5b16b115135be365beb370858df76) ---- - hw/xwayland/xwayland-input.c | 94 ++++++++++++++++++++++++++++++++++++++++++++ - hw/xwayland/xwayland.h | 22 +++++++++++ - 2 files changed, 116 insertions(+) - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index 1d2be978e..d5d12933c 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -1191,6 +1191,69 @@ xwl_seat_destroy(struct xwl_seat *xwl_seat) - - - static void -+tablet_seat_handle_add_tablet(void *data, struct zwp_tablet_seat_v2 *tablet_seat, -+ struct zwp_tablet_v2 *tablet) -+{ -+ struct xwl_seat *xwl_seat = data; -+ struct xwl_tablet *xwl_tablet; -+ -+ xwl_tablet = calloc(sizeof *xwl_tablet, 1); -+ if (xwl_tablet == NULL) { -+ ErrorF("%s ENOMEM\n", __func__); -+ return; -+ } -+ -+ xwl_tablet->tablet = tablet; -+ xwl_tablet->seat = xwl_seat; -+ -+ xorg_list_add(&xwl_tablet->link, &xwl_seat->tablets); -+} -+ -+static void -+tablet_seat_handle_add_tool(void *data, struct zwp_tablet_seat_v2 *tablet_seat, -+ struct zwp_tablet_tool_v2 *tool) -+{ -+ struct xwl_seat *xwl_seat = data; -+ struct xwl_tablet_tool *xwl_tablet_tool; -+ -+ xwl_tablet_tool = calloc(sizeof *xwl_tablet_tool, 1); -+ if (xwl_tablet_tool == NULL) { -+ ErrorF("%s ENOMEM\n", __func__); -+ return; -+ } -+ -+ xwl_tablet_tool->tool = tool; -+ xwl_tablet_tool->seat = xwl_seat; -+ -+ xorg_list_add(&xwl_tablet_tool->link, &xwl_seat->tablet_tools); -+} -+ -+static void -+tablet_seat_handle_add_pad(void *data, struct zwp_tablet_seat_v2 *tablet_seat, -+ struct zwp_tablet_pad_v2 *pad) -+{ -+ struct xwl_seat *xwl_seat = data; -+ struct xwl_tablet_pad *xwl_tablet_pad; -+ -+ xwl_tablet_pad = calloc(sizeof *xwl_tablet_pad, 1); -+ if (xwl_tablet_pad == NULL) { -+ ErrorF("%s ENOMEM\n", __func__); -+ return; -+ } -+ -+ xwl_tablet_pad->pad = pad; -+ xwl_tablet_pad->seat = xwl_seat; -+ -+ xorg_list_add(&xwl_tablet_pad->link, &xwl_seat->tablet_pads); -+} -+ -+static const struct zwp_tablet_seat_v2_listener tablet_seat_listener = { -+ tablet_seat_handle_add_tablet, -+ tablet_seat_handle_add_tool, -+ tablet_seat_handle_add_pad -+}; -+ -+static void - init_tablet_manager_seat(struct xwl_screen *xwl_screen, - struct xwl_seat *xwl_seat) - { -@@ -1200,11 +1263,42 @@ init_tablet_manager_seat(struct xwl_screen *xwl_screen, - xwl_seat->tablet_seat = - zwp_tablet_manager_v2_get_tablet_seat(xwl_screen->tablet_manager, - xwl_seat->seat); -+ -+ xorg_list_init(&xwl_seat->tablets); -+ xorg_list_init(&xwl_seat->tablet_tools); -+ xorg_list_init(&xwl_seat->tablet_pads); -+ -+ zwp_tablet_seat_v2_add_listener(xwl_seat->tablet_seat, &tablet_seat_listener, xwl_seat); - } - - static void - release_tablet_manager_seat(struct xwl_seat *xwl_seat) - { -+ struct xwl_tablet *xwl_tablet, *next_xwl_tablet; -+ struct xwl_tablet_tool *xwl_tablet_tool, *next_xwl_tablet_tool; -+ struct xwl_tablet_pad *xwl_tablet_pad, *next_xwl_tablet_pad; -+ -+ xorg_list_for_each_entry_safe(xwl_tablet_pad, next_xwl_tablet_pad, -+ &xwl_seat->tablet_pads, link) { -+ xorg_list_del(&xwl_tablet_pad->link); -+ zwp_tablet_pad_v2_destroy(xwl_tablet_pad->pad); -+ free(xwl_tablet_pad); -+ } -+ -+ xorg_list_for_each_entry_safe(xwl_tablet_tool, next_xwl_tablet_tool, -+ &xwl_seat->tablet_tools, link) { -+ xorg_list_del(&xwl_tablet_tool->link); -+ zwp_tablet_tool_v2_destroy(xwl_tablet_tool->tool); -+ free(xwl_tablet_tool); -+ } -+ -+ xorg_list_for_each_entry_safe(xwl_tablet, next_xwl_tablet, -+ &xwl_seat->tablets, link) { -+ xorg_list_del(&xwl_tablet->link); -+ zwp_tablet_v2_destroy(xwl_tablet->tablet); -+ free(xwl_tablet); -+ } -+ - if (xwl_seat->tablet_seat) { - zwp_tablet_seat_v2_destroy(xwl_seat->tablet_seat); - xwl_seat->tablet_seat = NULL; -diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h -index 2752d731c..a7f30b3c8 100644 ---- a/hw/xwayland/xwayland.h -+++ b/hw/xwayland/xwayland.h -@@ -174,6 +174,28 @@ struct xwl_seat { - double dx_unaccel; - double dy_unaccel; - } pending_pointer_event; -+ -+ struct xorg_list tablets; -+ struct xorg_list tablet_tools; -+ struct xorg_list tablet_pads; -+}; -+ -+struct xwl_tablet { -+ struct xorg_list link; -+ struct zwp_tablet_v2 *tablet; -+ struct xwl_seat *seat; -+}; -+ -+struct xwl_tablet_tool { -+ struct xorg_list link; -+ struct zwp_tablet_tool_v2 *tool; -+ struct xwl_seat *seat; -+}; -+ -+struct xwl_tablet_pad { -+ struct xorg_list link; -+ struct zwp_tablet_pad_v2 *pad; -+ struct xwl_seat *seat; - }; - - struct xwl_output { --- -2.13.5 - diff --git a/0004-xfree86-xf86platformProbe-split-finding-pci-info-and.patch b/0004-xfree86-xf86platformProbe-split-finding-pci-info-and.patch deleted file mode 100644 index 03d404e..0000000 --- a/0004-xfree86-xf86platformProbe-split-finding-pci-info-and.patch +++ /dev/null @@ -1,61 +0,0 @@ -From ab1a65b7755d081b41188104b21f4d21eaa3187b Mon Sep 17 00:00:00 2001 -From: Hans De Goede -Date: Mon, 12 Dec 2016 17:03:15 +0100 -Subject: [PATCH xserver 4/6] xfree86: xf86platformProbe: split finding - pci-info and setting primary GPU - -This is a preparation patch for allowing an OutputClass section to -override the default primary GPU device selection. - -Reviewed-by: Adam Jackson -Signed-off-by: Hans de Goede ---- - hw/xfree86/common/xf86platformBus.c | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) - -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index a698c6c..39b3248 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -145,16 +145,9 @@ platform_find_pci_info(struct xf86_platform_device *pd, char *busid) - - iter = pci_slot_match_iterator_create(&devmatch); - info = pci_device_next(iter); -- if (info) { -+ if (info) - pd->pdev = info; -- pci_device_probe(info); -- if (pci_device_is_boot_vga(info)) { -- primaryBus.type = BUS_PLATFORM; -- primaryBus.id.plat = pd; -- } -- } - pci_iterator_destroy(iter); -- - } - - static Bool -@@ -307,6 +300,20 @@ xf86platformProbe(void) - platform_find_pci_info(&xf86_platform_devices[i], busid); - } - } -+ -+ for (i = 0; i < xf86_num_platform_devices; i++) { -+ struct xf86_platform_device *dev = &xf86_platform_devices[i]; -+ -+ if (!dev->pdev) -+ continue; -+ -+ pci_device_probe(dev->pdev); -+ if (pci_device_is_boot_vga(dev->pdev)) { -+ primaryBus.type = BUS_PLATFORM; -+ primaryBus.id.plat = dev; -+ } -+ } -+ - return 0; - } - --- -2.9.3 - diff --git a/0004-xwayland-Handle-wp_tablet-events.patch b/0004-xwayland-Handle-wp_tablet-events.patch deleted file mode 100644 index 4fb4453..0000000 --- a/0004-xwayland-Handle-wp_tablet-events.patch +++ /dev/null @@ -1,211 +0,0 @@ -From 591b08b3311c5217969a8ceb3ed58b58fabc4891 Mon Sep 17 00:00:00 2001 -From: Jason Gerecke -Date: Fri, 15 Jan 2016 17:01:38 -0800 -Subject: [PATCH xserver 04/12] xwayland: Handle wp_tablet events - -Creates and maintains the canonical trio of X devices (stylus, eraser, -and cursor) to be shared by all connected tablets. A per-tablet trio -could be created instead, but there are very few benefits to such a -configuration since all tablets still ultimately share control of a -single master pointer. - -The three X devices are modeled after those created by xf86-input-wacom -but use a generic maximum X and Y that should be large enough to -accurately represent values from even the largest currently-available -tablets. - -Signed-off-by: Jason Gerecke -Signed-off-by: Carlos Garnacho -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Acked-by: Ping Cheng -(cherry picked from commit 5812d1c28f4fb7b7de8b96a81415a21425561fd4) ---- - hw/xwayland/xwayland-input.c | 142 +++++++++++++++++++++++++++++++++++++++++++ - hw/xwayland/xwayland.h | 3 + - 2 files changed, 145 insertions(+) - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index d5d12933c..64655de5f 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -294,6 +294,75 @@ xwl_touch_proc(DeviceIntPtr device, int what) - #undef NTOUCHPOINTS - } - -+static int -+xwl_tablet_proc(DeviceIntPtr device, int what) -+{ -+#define NBUTTONS 9 -+#define NAXES 6 -+ Atom btn_labels[NBUTTONS] = { 0 }; -+ Atom axes_labels[NAXES] = { 0 }; -+ BYTE map[NBUTTONS + 1] = { 0 }; -+ int i; -+ -+ switch (what) { -+ case DEVICE_INIT: -+ device->public.on = FALSE; -+ -+ for (i = 1; i <= NBUTTONS; i++) -+ map[i] = i; -+ -+ axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X); -+ axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y); -+ axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE); -+ axes_labels[3] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X); -+ axes_labels[4] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y); -+ axes_labels[5] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_WHEEL); -+ -+ if (!InitValuatorClassDeviceStruct(device, NAXES, axes_labels, -+ GetMotionHistorySize(), Absolute)) -+ return BadValue; -+ -+ /* Valuators - match the xf86-input-wacom ranges */ -+ InitValuatorAxisStruct(device, 0, axes_labels[0], -+ 0, 262143, 10000, 0, 10000, Absolute); -+ InitValuatorAxisStruct(device, 1, axes_labels[1], -+ 0, 262143, 10000, 0, 10000, Absolute); -+ /* pressure */ -+ InitValuatorAxisStruct(device, 2, axes_labels[2], -+ 0, 65535, 1, 0, 1, Absolute); -+ /* tilt x */ -+ InitValuatorAxisStruct(device, 3, axes_labels[3], -+ -64, 63, 57, 0, 57, Absolute); -+ /* tilt y */ -+ InitValuatorAxisStruct(device, 4, axes_labels[4], -+ -64, 63, 57, 0, 57, Absolute); -+ /* abs wheel (airbrush) or rotation (artpen) */ -+ InitValuatorAxisStruct(device, 5, axes_labels[5], -+ -900, 899, 1, 0, 1, Absolute); -+ -+ if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control)) -+ return BadValue; -+ -+ if (!InitButtonClassDeviceStruct(device, NBUTTONS, btn_labels, map)) -+ return BadValue; -+ -+ return Success; -+ -+ case DEVICE_ON: -+ device->public.on = TRUE; -+ return Success; -+ -+ case DEVICE_OFF: -+ case DEVICE_CLOSE: -+ device->public.on = FALSE; -+ return Success; -+ } -+ -+ return BadMatch; -+#undef NAXES -+#undef NBUTTONS -+} -+ - static void - pointer_handle_enter(void *data, struct wl_pointer *pointer, - uint32_t serial, struct wl_surface *surface, -@@ -1189,6 +1258,77 @@ xwl_seat_destroy(struct xwl_seat *xwl_seat) - free(xwl_seat); - } - -+static void -+tablet_handle_name(void *data, struct zwp_tablet_v2 *tablet, const char *name) -+{ -+} -+ -+static void -+tablet_handle_id(void *data, struct zwp_tablet_v2 *tablet, uint32_t vid, -+ uint32_t pid) -+{ -+} -+ -+static void -+tablet_handle_path(void *data, struct zwp_tablet_v2 *tablet, const char *path) -+{ -+} -+ -+static void -+tablet_handle_done(void *data, struct zwp_tablet_v2 *tablet) -+{ -+ struct xwl_tablet *xwl_tablet = data; -+ struct xwl_seat *xwl_seat = xwl_tablet->seat; -+ -+ if (xwl_seat->stylus == NULL) { -+ xwl_seat->stylus = add_device(xwl_seat, "xwayland-stylus", xwl_tablet_proc); -+ ActivateDevice(xwl_seat->stylus, TRUE); -+ } -+ EnableDevice(xwl_seat->stylus, TRUE); -+ -+ if (xwl_seat->eraser == NULL) { -+ xwl_seat->eraser = add_device(xwl_seat, "xwayland-eraser", xwl_tablet_proc); -+ ActivateDevice(xwl_seat->eraser, TRUE); -+ } -+ EnableDevice(xwl_seat->eraser, TRUE); -+ -+ if (xwl_seat->puck == NULL) { -+ xwl_seat->puck = add_device(xwl_seat, "xwayland-cursor", xwl_tablet_proc); -+ ActivateDevice(xwl_seat->puck, TRUE); -+ } -+ EnableDevice(xwl_seat->puck, TRUE); -+} -+ -+static void -+tablet_handle_removed(void *data, struct zwp_tablet_v2 *tablet) -+{ -+ struct xwl_tablet *xwl_tablet = data; -+ struct xwl_seat *xwl_seat = xwl_tablet->seat; -+ -+ xorg_list_del(&xwl_tablet->link); -+ -+ /* The tablet is merely disabled, not removed. The next tablet -+ will re-use the same X devices */ -+ if (xorg_list_is_empty(&xwl_seat->tablets)) { -+ if (xwl_seat->stylus) -+ DisableDevice(xwl_seat->stylus, TRUE); -+ if (xwl_seat->eraser) -+ DisableDevice(xwl_seat->eraser, TRUE); -+ if (xwl_seat->puck) -+ DisableDevice(xwl_seat->puck, TRUE); -+ } -+ -+ zwp_tablet_v2_destroy(tablet); -+ free(xwl_tablet); -+} -+ -+static const struct zwp_tablet_v2_listener tablet_listener = { -+ tablet_handle_name, -+ tablet_handle_id, -+ tablet_handle_path, -+ tablet_handle_done, -+ tablet_handle_removed -+}; - - static void - tablet_seat_handle_add_tablet(void *data, struct zwp_tablet_seat_v2 *tablet_seat, -@@ -1207,6 +1347,8 @@ tablet_seat_handle_add_tablet(void *data, struct zwp_tablet_seat_v2 *tablet_seat - xwl_tablet->seat = xwl_seat; - - xorg_list_add(&xwl_tablet->link, &xwl_seat->tablets); -+ -+ zwp_tablet_v2_add_listener(tablet, &tablet_listener, xwl_tablet); - } - - static void -diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h -index a7f30b3c8..e7e62882b 100644 ---- a/hw/xwayland/xwayland.h -+++ b/hw/xwayland/xwayland.h -@@ -132,6 +132,9 @@ struct xwl_seat { - DeviceIntPtr relative_pointer; - DeviceIntPtr keyboard; - DeviceIntPtr touch; -+ DeviceIntPtr stylus; -+ DeviceIntPtr eraser; -+ DeviceIntPtr puck; - struct xwl_screen *xwl_screen; - struct wl_seat *seat; - struct wl_pointer *wl_pointer; --- -2.13.5 - diff --git a/0005-xfree86-Allow-overriding-primary-GPU-detection-from-.patch b/0005-xfree86-Allow-overriding-primary-GPU-detection-from-.patch deleted file mode 100644 index afa47e4..0000000 --- a/0005-xfree86-Allow-overriding-primary-GPU-detection-from-.patch +++ /dev/null @@ -1,91 +0,0 @@ -From d75ffcdbf8c1e3c8e0d46debcd533a9f2560f0a8 Mon Sep 17 00:00:00 2001 -From: Hans De Goede -Date: Mon, 12 Dec 2016 17:03:16 +0100 -Subject: [PATCH xserver 5/6] xfree86: Allow overriding primary GPU detection - from an OutputClass section - -Allow using: - -Option "PrimaryGPU" "yes" - -In an OutputClass section to override the default primary GPU device -selection which selects the GPU used as output by the firmware. - -If multiple output devices match an OutputClass section with -the PrimaryGPU option set, the first one enumerated becomes the -primary GPU. - -Reviewed-by: Adam Jackson -Signed-off-by: Hans de Goede ---- - hw/xfree86/common/xf86platformBus.c | 19 +++++++++++++++++++ - hw/xfree86/man/xorg.conf.man | 12 +++++++++++- - 2 files changed, 30 insertions(+), 1 deletion(-) - -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index 39b3248..fc17d15 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -286,6 +286,7 @@ xf86platformProbe(void) - { - int i; - Bool pci = TRUE; -+ XF86ConfOutputClassPtr cl; - - config_odev_probe(xf86PlatformDeviceProbe); - -@@ -301,6 +302,24 @@ xf86platformProbe(void) - } - } - -+ /* First see if there is an OutputClass match marking a device as primary */ -+ for (i = 0; i < xf86_num_platform_devices; i++) { -+ struct xf86_platform_device *dev = &xf86_platform_devices[i]; -+ for (cl = xf86configptr->conf_outputclass_lst; cl; cl = cl->list.next) { -+ if (!OutputClassMatches(cl, dev)) -+ continue; -+ -+ if (xf86CheckBoolOption(cl->option_lst, "PrimaryGPU", FALSE)) { -+ xf86Msg(X_CONFIG, "OutputClass \"%s\" setting %s as PrimaryGPU\n", -+ cl->identifier, dev->attribs->path); -+ primaryBus.type = BUS_PLATFORM; -+ primaryBus.id.plat = dev; -+ return 0; -+ } -+ } -+ } -+ -+ /* Then check for pci_device_is_boot_vga() */ - for (i = 0; i < xf86_num_platform_devices; i++) { - struct xf86_platform_device *dev = &xf86_platform_devices[i]; - -diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man -index 8928a53..79b71a8 100644 ---- a/hw/xfree86/man/xorg.conf.man -+++ b/hw/xfree86/man/xorg.conf.man -@@ -1285,11 +1285,21 @@ When an output device has been matched to the - .B OutputClass - section, any - .B Option --entries are applied to the device. See the -+entries are applied to the device. One -+.B OutputClass -+specific -+.B Option -+is recognized. See the - .B Device - section below for a description of the remaining - .B Option - entries. -+.TP 7 -+.BI "Option \*qPrimaryGPU\*q \*q" boolean \*q -+This option specifies that the matched device should be treated as the -+primary GPU, replacing the selection of the GPU used as output by the -+firmware. If multiple output devices match an OutputClass section with -+the PrimaryGPU option set, the first one enumerated becomes the primary GPU. - .SH "DEVICE SECTION" - The config file may have multiple - .B Device --- -2.9.3 - diff --git a/0005-xfree86-Remove-redundant-ServerIsNotSeat0-check-from.patch b/0005-xfree86-Remove-redundant-ServerIsNotSeat0-check-from.patch deleted file mode 100644 index 424e400..0000000 --- a/0005-xfree86-Remove-redundant-ServerIsNotSeat0-check-from.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c17e544b271ced65483692103d39ed1188d4ca25 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Tue, 27 Sep 2016 14:30:10 +0200 -Subject: [PATCH xserver v2 5/7] xfree86: Remove redundant ServerIsNotSeat0 - check from xf86CallDriverProbe - -If foundScreen is TRUE, then all the code below the removed if -will not execute until we reach the return foundScreen; at the -end, so this entire if block is redundant. - -Signed-off-by: Hans de Goede ---- - hw/xfree86/common/xf86Bus.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c -index 5b93940..27c6b1b 100644 ---- a/hw/xfree86/common/xf86Bus.c -+++ b/hw/xfree86/common/xf86Bus.c -@@ -82,8 +82,6 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only) - if (!xf86DoConfigure && drv->platformProbe != NULL) { - foundScreen = xf86platformProbeDev(drv); - } -- if (ServerIsNotSeat0() && foundScreen) -- return foundScreen; - #endif - - #ifdef XSERVER_LIBPCIACCESS --- -2.9.3 - diff --git a/0005-xwayland-Handle-tablet_tool-events.patch b/0005-xwayland-Handle-tablet_tool-events.patch deleted file mode 100644 index 5ebc618..0000000 --- a/0005-xwayland-Handle-tablet_tool-events.patch +++ /dev/null @@ -1,374 +0,0 @@ -From 4354336014ca0c29270a6cdf83e9f9e5fe16080e Mon Sep 17 00:00:00 2001 -From: Jason Gerecke -Date: Fri, 14 Oct 2016 14:31:46 -0700 -Subject: [PATCH xserver 05/12] xwayland: Handle tablet_tool events - -Translates Wayland tablet events into corresponding X11 tablet events. As -with the prior commit, these events are modeled after those created by the -xf86-input-wacom driver to maximize compatibility with existing applications. - -Signed-off-by: Jason Gerecke -Signed-off-by: Carlos Garnacho -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Acked-by: Ping Cheng -(cherry picked from commit 8a1defcc634daddbb3570519d69ec5c9e39a8b56) ---- - hw/xwayland/xwayland-input.c | 313 +++++++++++++++++++++++++++++++++++++++++++ - hw/xwayland/xwayland.h | 9 ++ - 2 files changed, 322 insertions(+) - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index 64655de5f..142862f7e 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -1331,6 +1331,317 @@ static const struct zwp_tablet_v2_listener tablet_listener = { - }; - - static void -+tablet_tool_receive_type(void *data, struct zwp_tablet_tool_v2 *tool, -+ uint32_t type) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ -+ switch (type) { -+ case ZWP_TABLET_TOOL_V2_TYPE_ERASER: -+ xwl_tablet_tool->xdevice = xwl_seat->eraser; -+ break; -+ case ZWP_TABLET_TOOL_V2_TYPE_MOUSE: -+ case ZWP_TABLET_TOOL_V2_TYPE_LENS: -+ xwl_tablet_tool->xdevice = xwl_seat->puck; -+ break; -+ default: -+ xwl_tablet_tool->xdevice = xwl_seat->stylus; -+ break; -+ } -+} -+ -+static void -+tablet_tool_receive_hardware_serial(void *data, struct zwp_tablet_tool_v2 *tool, -+ uint32_t hi, uint32_t low) -+{ -+} -+ -+static void -+tablet_tool_receive_hardware_id_wacom(void *data, struct zwp_tablet_tool_v2 *tool, -+ uint32_t hi, uint32_t low) -+{ -+} -+ -+static void -+tablet_tool_receive_capability(void *data, struct zwp_tablet_tool_v2 *tool, -+ uint32_t capability) -+{ -+} -+ -+static void -+tablet_tool_receive_done(void *data, struct zwp_tablet_tool_v2 *tool) -+{ -+} -+ -+static void -+tablet_tool_receive_removed(void *data, struct zwp_tablet_tool_v2 *tool) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ -+ xorg_list_del(&xwl_tablet_tool->link); -+ zwp_tablet_tool_v2_destroy(tool); -+ free(xwl_tablet_tool); -+} -+ -+static void -+tablet_tool_proximity_in(void *data, struct zwp_tablet_tool_v2 *tool, -+ uint32_t serial, struct zwp_tablet_v2 *tablet, -+ struct wl_surface *wl_surface) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ -+ /* There's a race here where if we create and then immediately -+ * destroy a surface, we might end up in a state where the Wayland -+ * compositor sends us an event for a surface that doesn't exist. -+ * -+ * Don't process enter events in this case. -+ * -+ * see pointer_handle_enter() -+ */ -+ if (wl_surface == NULL) -+ return; -+ -+ xwl_seat->focus_window = wl_surface_get_user_data(wl_surface); -+} -+ -+static void -+tablet_tool_proximity_out(void *data, struct zwp_tablet_tool_v2 *tool) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ -+ xwl_seat->focus_window = NULL; -+ -+ xwl_tablet_tool->pressure = 0; -+ xwl_tablet_tool->tilt_x = 0; -+ xwl_tablet_tool->tilt_y = 0; -+ xwl_tablet_tool->rotation = 0; -+ xwl_tablet_tool->slider = 0; -+} -+ -+static void -+tablet_tool_down(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t serial) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ ValuatorMask mask; -+ -+ 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); -+} -+ -+static void -+tablet_tool_motion(void *data, struct zwp_tablet_tool_v2 *tool, -+ wl_fixed_t x, wl_fixed_t y) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ int32_t dx, dy; -+ int sx = wl_fixed_to_int(x); -+ int sy = wl_fixed_to_int(y); -+ -+ if (!xwl_seat->focus_window) -+ return; -+ -+ dx = xwl_seat->focus_window->window->drawable.x; -+ dy = xwl_seat->focus_window->window->drawable.y; -+ -+ xwl_tablet_tool->x = dx + sx; -+ xwl_tablet_tool->y = dy + sy; -+} -+ -+static void -+tablet_tool_pressure(void *data, struct zwp_tablet_tool_v2 *tool, -+ uint32_t pressure) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ -+ if (!xwl_seat->focus_window) -+ return; -+ -+ /* normalized to 65535 already */ -+ xwl_tablet_tool->pressure = pressure; -+} -+ -+static void -+tablet_tool_distance(void *data, struct zwp_tablet_tool_v2 *tool, -+ uint32_t distance_raw) -+{ -+} -+ -+static void -+tablet_tool_tilt(void *data, struct zwp_tablet_tool_v2 *tool, -+ wl_fixed_t tilt_x, wl_fixed_t tilt_y) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ -+ if (!xwl_seat->focus_window) -+ return; -+ -+ xwl_tablet_tool->tilt_x = wl_fixed_to_double(tilt_x); -+ xwl_tablet_tool->tilt_y = wl_fixed_to_double(tilt_y); -+} -+ -+static void -+tablet_tool_rotation(void *data, struct zwp_tablet_tool_v2 *tool, -+ wl_fixed_t angle) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ double rotation = wl_fixed_to_double(angle); -+ -+ if (!xwl_seat->focus_window) -+ return; -+ -+ /* change origin (buttons facing right [libinput +90 degrees]) and -+ * scaling (5 points per degree) to match wacom driver behavior -+ */ -+ rotation = remainderf(rotation + 90.0f, 360.0f); -+ rotation *= 5.0f; -+ xwl_tablet_tool->rotation = rotation; -+} -+ -+static void -+tablet_tool_slider(void *data, struct zwp_tablet_tool_v2 *tool, -+ int32_t position_raw) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ float position = position_raw / 65535.0; -+ -+ if (!xwl_seat->focus_window) -+ return; -+ -+ xwl_tablet_tool->slider = (position * 1799.0f) - 900.0f; -+} -+ -+static void -+tablet_tool_wheel(void *data, struct zwp_tablet_tool_v2 *tool, -+ wl_fixed_t degrees, int32_t clicks) -+{ -+} -+ -+static void -+tablet_tool_button_state(void *data, struct zwp_tablet_tool_v2 *tool, -+ uint32_t serial, uint32_t button, uint32_t state) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ int xbtn = 0; -+ ValuatorMask mask; -+ -+ /* BTN_0 .. BTN_9 */ -+ if (button >= 0x100 && button <= 0x109) { -+ xbtn = button - 0x100 + 1; -+ } -+ /* BTN_A .. BTN_Z */ -+ else if (button >= 0x130 && button <= 0x135) { -+ xbtn = button - 0x130 + 10; -+ } -+ /* BTN_BASE .. BTN_BASE6 */ -+ else if (button >= 0x126 && button <= 0x12b) { -+ xbtn = button - 0x126 + 16; -+ } -+ else { -+ switch (button) { -+ case 0x110: /* BTN_LEFT */ -+ case 0x14a: /* BTN_TOUCH */ -+ xbtn = 1; -+ break; -+ -+ case 0x112: /* BTN_MIDDLE */ -+ case 0x14b: /* BTN_STYLUS */ -+ xbtn = 2; -+ break; -+ -+ case 0x111: /* BTN_RIGHT */ -+ case 0x14c: /* BTN_STYLUS2 */ -+ xbtn = 3; -+ break; -+ -+ case 0x113: /* BTN_SIDE */ -+ case 0x116: /* BTN_BACK */ -+ xbtn = 8; -+ break; -+ -+ case 0x114: /* BTN_EXTRA */ -+ case 0x115: /* BTN_FORWARD */ -+ xbtn = 9; -+ break; -+ } -+ } -+ -+ if (!xbtn) { -+ ErrorF("unknown tablet button number %d\n", button); -+ return; -+ } -+ -+ xwl_seat->xwl_screen->serial = serial; -+ -+ valuator_mask_zero(&mask); -+ QueuePointerEvents(xwl_tablet_tool->xdevice, -+ state ? ButtonPress : ButtonRelease, xbtn, 0, &mask); -+} -+ -+static void -+tablet_tool_frame(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t time) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ ValuatorMask mask; -+ -+ valuator_mask_zero(&mask); -+ valuator_mask_set(&mask, 0, xwl_tablet_tool->x); -+ valuator_mask_set(&mask, 1, xwl_tablet_tool->y); -+ valuator_mask_set(&mask, 2, xwl_tablet_tool->pressure); -+ valuator_mask_set(&mask, 3, xwl_tablet_tool->tilt_x); -+ valuator_mask_set(&mask, 4, xwl_tablet_tool->tilt_y); -+ valuator_mask_set(&mask, 5, xwl_tablet_tool->rotation + xwl_tablet_tool->slider); -+ -+ /* FIXME: Store button mask in xwl_tablet_tool and send events *HERE* if -+ changed */ -+ QueuePointerEvents(xwl_tablet_tool->xdevice, MotionNotify, 0, -+ POINTER_ABSOLUTE | POINTER_SCREEN, &mask); -+} -+ -+static const struct zwp_tablet_tool_v2_listener tablet_tool_listener = { -+ tablet_tool_receive_type, -+ tablet_tool_receive_hardware_serial, -+ tablet_tool_receive_hardware_id_wacom, -+ tablet_tool_receive_capability, -+ tablet_tool_receive_done, -+ tablet_tool_receive_removed, -+ tablet_tool_proximity_in, -+ tablet_tool_proximity_out, -+ tablet_tool_down, -+ tablet_tool_up, -+ tablet_tool_motion, -+ tablet_tool_pressure, -+ tablet_tool_distance, -+ tablet_tool_tilt, -+ tablet_tool_rotation, -+ tablet_tool_slider, -+ tablet_tool_wheel, -+ tablet_tool_button_state, -+ tablet_tool_frame -+}; -+ -+static void - tablet_seat_handle_add_tablet(void *data, struct zwp_tablet_seat_v2 *tablet_seat, - struct zwp_tablet_v2 *tablet) - { -@@ -1368,6 +1679,8 @@ tablet_seat_handle_add_tool(void *data, struct zwp_tablet_seat_v2 *tablet_seat, - xwl_tablet_tool->seat = xwl_seat; - - xorg_list_add(&xwl_tablet_tool->link, &xwl_seat->tablet_tools); -+ -+ zwp_tablet_tool_v2_add_listener(tool, &tablet_tool_listener, xwl_tablet_tool); - } - - static void -diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h -index e7e62882b..fb9ac4804 100644 ---- a/hw/xwayland/xwayland.h -+++ b/hw/xwayland/xwayland.h -@@ -193,6 +193,15 @@ struct xwl_tablet_tool { - struct xorg_list link; - struct zwp_tablet_tool_v2 *tool; - struct xwl_seat *seat; -+ -+ DeviceIntPtr xdevice; -+ uint32_t x; -+ uint32_t y; -+ uint32_t pressure; -+ float tilt_x; -+ float tilt_y; -+ float rotation; -+ float slider; - }; - - struct xwl_tablet_pad { --- -2.13.5 - diff --git a/0006-xfree86-Add-ModulePath-support-for-OutputClass-confi.patch b/0006-xfree86-Add-ModulePath-support-for-OutputClass-confi.patch deleted file mode 100644 index 6ba4018..0000000 --- a/0006-xfree86-Add-ModulePath-support-for-OutputClass-confi.patch +++ /dev/null @@ -1,183 +0,0 @@ -From b5dffbbac193aa640ffcfa0a431c21b862854e53 Mon Sep 17 00:00:00 2001 -From: Hans De Goede -Date: Mon, 12 Dec 2016 17:03:17 +0100 -Subject: [PATCH xserver 6/6] xfree86: Add ModulePath support for OutputClass - config Sections - -Allow OutputClass config snippets to modify the module-path. - -Note that any specified ModulePaths will be pre-pended to the normal -ModulePath. The idea behind this is that any output hardware specific -modules should have preference over the normal modules. - -One use-case for this is the nvidia binary driver, this allows a -config snippet like this: - -Section "OutputClass" - MatchDriver "nvidia" - Modulepath "/usr/lib64/nvidia/modules" -EndSection - -To get the nvidia glx specific glx module loaded, but only when the -nvidia kernel driver is loaded. - -Together with the glvnd work done recently, this allows the nouveau -+ mesa and nvidia-binary userspace stacks to co-exist on the same -system without any ldconfig / xorg.conf tweaking and the xserver will -automatically do the right thing depending on which kernel driver -(nouveau or nvidia) is loaded. - -Reviewed-by: Adam Jackson -Signed-off-by: Hans de Goede ---- - hw/xfree86/common/xf86platformBus.c | 23 +++++++++++++++++++++++ - hw/xfree86/loader/loadmod.c | 1 + - hw/xfree86/man/xorg.conf.man | 16 ++++++++++++++++ - hw/xfree86/parser/OutputClass.c | 15 +++++++++++++++ - hw/xfree86/parser/xf86Parser.h | 1 + - 5 files changed, 56 insertions(+) - -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index fc17d15..0b5795f 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -40,6 +40,7 @@ - #include "hotplug.h" - #include "systemd-logind.h" - -+#include "loaderProcs.h" - #include "xf86.h" - #include "xf86_OSproc.h" - #include "xf86Priv.h" -@@ -287,6 +288,7 @@ xf86platformProbe(void) - int i; - Bool pci = TRUE; - XF86ConfOutputClassPtr cl; -+ char *old_path, *path = NULL; - - config_odev_probe(xf86PlatformDeviceProbe); - -@@ -300,8 +302,29 @@ xf86platformProbe(void) - if (pci && (strncmp(busid, "pci:", 4) == 0)) { - platform_find_pci_info(&xf86_platform_devices[i], busid); - } -+ -+ /* -+ * Deal with OutputClass ModulePath directives, these must be -+ * processed before we do any module loading. -+ */ -+ for (cl = xf86configptr->conf_outputclass_lst; cl; cl = cl->list.next) { -+ if (!OutputClassMatches(cl, &xf86_platform_devices[i])) -+ continue; -+ -+ if (cl->modulepath && xf86ModPathFrom != X_CMDLINE) { -+ old_path = path; -+ XNFasprintf(&path, "%s,%s", cl->modulepath, -+ path ? path : xf86ModulePath); -+ free(old_path); -+ xf86Msg(X_CONFIG, "OutputClass \"%s\" ModulePath extended to \"%s\"\n", -+ cl->identifier, path); -+ LoaderSetPath(path); -+ } -+ } - } - -+ free(path); -+ - /* First see if there is an OutputClass match marking a device as primary */ - for (i = 0; i < xf86_num_platform_devices; i++) { - struct xf86_platform_device *dev = &xf86_platform_devices[i]; -diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c -index 8bf6836..940f5fc 100644 ---- a/hw/xfree86/loader/loadmod.c -+++ b/hw/xfree86/loader/loadmod.c -@@ -184,6 +184,7 @@ LoaderSetPath(const char *path) - if (!path) - return; - -+ FreeStringList(defaultPathList); - defaultPathList = InitPathList(path); - } - -diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man -index 79b71a8..00ebf56 100644 ---- a/hw/xfree86/man/xorg.conf.man -+++ b/hw/xfree86/man/xorg.conf.man -@@ -1300,6 +1300,22 @@ This option specifies that the matched device should be treated as the - primary GPU, replacing the selection of the GPU used as output by the - firmware. If multiple output devices match an OutputClass section with - the PrimaryGPU option set, the first one enumerated becomes the primary GPU. -+.PP -+A -+.B OutputClass -+Section may contain -+.B ModulePath -+entries. When an output device matches an -+.B OutputClass -+section, any -+.B ModulePath -+entries in that -+.B OutputClass -+are pre-pended to the search path for loadable Xorg server modules. See -+.B ModulePath -+in the -+.B Files -+section for more info. - .SH "DEVICE SECTION" - The config file may have multiple - .B Device -diff --git a/hw/xfree86/parser/OutputClass.c b/hw/xfree86/parser/OutputClass.c -index f813ee6..01b348f 100644 ---- a/hw/xfree86/parser/OutputClass.c -+++ b/hw/xfree86/parser/OutputClass.c -@@ -36,6 +36,7 @@ static const xf86ConfigSymTabRec OutputClassTab[] = { - {ENDSECTION, "endsection"}, - {IDENTIFIER, "identifier"}, - {DRIVER, "driver"}, -+ {MODULEPATH, "modulepath"}, - {OPTION, "option"}, - {MATCH_DRIVER, "matchdriver"}, - {-1, ""}, -@@ -53,6 +54,7 @@ xf86freeOutputClassList(XF86ConfOutputClassPtr ptr) - TestFree(ptr->identifier); - TestFree(ptr->comment); - TestFree(ptr->driver); -+ TestFree(ptr->modulepath); - - xorg_list_for_each_entry_safe(group, next, &ptr->match_driver, entry) { - xorg_list_del(&group->entry); -@@ -115,6 +117,19 @@ xf86parseOutputClassSection(void) - else - ptr->driver = xf86_lex_val.str; - break; -+ case MODULEPATH: -+ if (xf86getSubToken(&(ptr->comment)) != STRING) -+ Error(QUOTE_MSG, "ModulePath"); -+ if (ptr->modulepath) { -+ char *path; -+ XNFasprintf(&path, "%s,%s", ptr->modulepath, xf86_lex_val.str); -+ free(xf86_lex_val.str); -+ free(ptr->modulepath); -+ ptr->modulepath = path; -+ } else { -+ ptr->modulepath = xf86_lex_val.str; -+ } -+ break; - case OPTION: - ptr->option_lst = xf86parseOption(ptr->option_lst); - break; -diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h -index 897edab..e014048 100644 ---- a/hw/xfree86/parser/xf86Parser.h -+++ b/hw/xfree86/parser/xf86Parser.h -@@ -337,6 +337,7 @@ typedef struct { - GenericListRec list; - char *identifier; - char *driver; -+ char *modulepath; - struct xorg_list match_driver; - XF86OptionPtr option_lst; - char *comment; --- -2.9.3 - diff --git a/0006-xfree86-Make-adding-unclaimed-devices-as-GPU-devices.patch b/0006-xfree86-Make-adding-unclaimed-devices-as-GPU-devices.patch deleted file mode 100644 index c0af28d..0000000 --- a/0006-xfree86-Make-adding-unclaimed-devices-as-GPU-devices.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 74bc0fff3a6ca233e56b3fb2971bca97b5a4f8b5 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 30 Sep 2016 11:59:04 +0200 -Subject: [PATCH xserver v2 6/7] xfree86: Make adding unclaimed devices as GPU - devices a separate step - -This is primarily a preparation patch for fixing the xserver exiting with -a "no screens found" error even though there are supported video cards, -due to the server not recognizing any card as the primary card. - -This also fixes the (mostly theoretical) case of a platformBus capable -driver adding a device as GPUscreen before a driver which only supports -the old PCI probe method gets a chance to claim it as a normal screen. - -Signed-off-by: Hans de Goede ---- - hw/xfree86/common/xf86Bus.c | 4 ++++ - hw/xfree86/common/xf86platformBus.c | 15 +++++++++++++++ - hw/xfree86/common/xf86platformBus.h | 6 ++++++ - 3 files changed, 25 insertions(+) - -diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c -index 27c6b1b..a3a9898 100644 ---- a/hw/xfree86/common/xf86Bus.c -+++ b/hw/xfree86/common/xf86Bus.c -@@ -125,6 +125,10 @@ xf86BusConfig(void) - xf86CallDriverProbe(xf86DriverList[i], FALSE); - } - -+ for (i = 0; i < xf86NumDrivers; i++) { -+ xf86platformAddGPUDevices(xf86DriverList[i]); -+ } -+ - /* If nothing was detected, return now */ - if (xf86NumScreens == 0) { - xf86Msg(X_ERROR, "No devices detected.\n"); -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index 39fb1dd..8dd0d5d 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -475,6 +475,21 @@ xf86platformProbeDev(DriverPtr drvp) - isGPUDevice(devList[i]) ? PLATFORM_PROBE_GPU_SCREEN : 0); - } - -+ return foundScreen; -+} -+ -+int -+xf86platformAddGPUDevices(DriverPtr drvp) -+{ -+ Bool foundScreen = FALSE; -+ GDevPtr *devList; -+ int j; -+ -+ if (!drvp->platformProbe) -+ return FALSE; -+ -+ xf86MatchDevice(drvp->driverName, &devList); -+ - /* if autoaddgpu devices is enabled then go find any unclaimed platform - * devices and add them as GPU screens */ - if (xf86Info.autoAddGPU) { -diff --git a/hw/xfree86/common/xf86platformBus.h b/hw/xfree86/common/xf86platformBus.h -index a7335b9..0f5c0ef 100644 ---- a/hw/xfree86/common/xf86platformBus.h -+++ b/hw/xfree86/common/xf86platformBus.h -@@ -41,6 +41,7 @@ struct xf86_platform_device { - #ifdef XSERVER_PLATFORM_BUS - int xf86platformProbe(void); - int xf86platformProbeDev(DriverPtr drvp); -+int xf86platformAddGPUDevices(DriverPtr drvp); - - extern int xf86_num_platform_devices; - extern struct xf86_platform_device *xf86_platform_devices; -@@ -156,6 +157,11 @@ xf86PlatformMatchDriver(char *matches[], int nmatches); - - extern void xf86platformVTProbe(void); - extern void xf86platformPrimary(void); -+ -+#else -+ -+static inline int xf86platformAddGPUDevices(DriverPtr drvp) { return FALSE; } -+ - #endif - - #endif --- -2.9.3 - diff --git a/0006-xwayland-handle-button-events-after-motion-events.patch b/0006-xwayland-handle-button-events-after-motion-events.patch deleted file mode 100644 index 97b0c48..0000000 --- a/0006-xwayland-handle-button-events-after-motion-events.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 317ce1201a2ec848f9066294ea544b756f735385 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 7 Feb 2017 12:23:46 +1000 -Subject: [PATCH xserver 06/12] xwayland: handle button events after motion - events - -Make sure the button events are sent after the motion events into the new -position. - -Signed-off-by: Peter Hutterer -Acked-by: Ping Cheng -(cherry picked from commit 773b04748d0c839bc8b12e33f74bb8d11c447f5b) ---- - hw/xwayland/xwayland-input.c | 44 +++++++++++++++++++++++++++++++++++++------- - hw/xwayland/xwayland.h | 3 +++ - 2 files changed, 40 insertions(+), 7 deletions(-) - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index 142862f7e..50da10839 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - #include "tablet-unstable-v2-client-protocol.h" - - /* Copied from mipointer.c */ -@@ -1543,8 +1544,8 @@ tablet_tool_button_state(void *data, struct zwp_tablet_tool_v2 *tool, - { - 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; - int xbtn = 0; -- ValuatorMask mask; - - /* BTN_0 .. BTN_9 */ - if (button >= 0x100 && button <= 0x109) { -@@ -1592,11 +1593,14 @@ tablet_tool_button_state(void *data, struct zwp_tablet_tool_v2 *tool, - return; - } - -- xwl_seat->xwl_screen->serial = serial; -+ BUG_RETURN(xbtn >= 8 * sizeof(*mask)); - -- valuator_mask_zero(&mask); -- QueuePointerEvents(xwl_tablet_tool->xdevice, -- state ? ButtonPress : ButtonRelease, xbtn, 0, &mask); -+ if (state) -+ SetBit(mask, xbtn); -+ else -+ ClearBit(mask, xbtn); -+ -+ xwl_seat->xwl_screen->serial = serial; - } - - static void -@@ -1604,6 +1608,8 @@ tablet_tool_frame(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t time) - { - struct xwl_tablet_tool *xwl_tablet_tool = data; - ValuatorMask mask; -+ uint32_t released, pressed, diff; -+ int button; - - valuator_mask_zero(&mask); - valuator_mask_set(&mask, 0, xwl_tablet_tool->x); -@@ -1613,10 +1619,34 @@ tablet_tool_frame(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t time) - valuator_mask_set(&mask, 4, xwl_tablet_tool->tilt_y); - valuator_mask_set(&mask, 5, xwl_tablet_tool->rotation + xwl_tablet_tool->slider); - -- /* FIXME: Store button mask in xwl_tablet_tool and send events *HERE* if -- changed */ - QueuePointerEvents(xwl_tablet_tool->xdevice, MotionNotify, 0, - POINTER_ABSOLUTE | POINTER_SCREEN, &mask); -+ -+ 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; -+ -+ button = 1; -+ while (released) { -+ if (released & 0x1) -+ QueuePointerEvents(xwl_tablet_tool->xdevice, -+ ButtonRelease, button, 0, &mask); -+ button++; -+ released >>= 1; -+ } -+ -+ button = 1; -+ while (pressed) { -+ if (pressed & 0x1) -+ QueuePointerEvents(xwl_tablet_tool->xdevice, -+ ButtonPress, button, 0, &mask); -+ button++; -+ pressed >>= 1; -+ } -+ -+ xwl_tablet_tool->buttons_prev = xwl_tablet_tool->buttons_now; - } - - static const struct zwp_tablet_tool_v2_listener tablet_tool_listener = { -diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h -index fb9ac4804..bb119dad7 100644 ---- a/hw/xwayland/xwayland.h -+++ b/hw/xwayland/xwayland.h -@@ -202,6 +202,9 @@ struct xwl_tablet_tool { - float tilt_y; - float rotation; - float slider; -+ -+ uint32_t buttons_now, -+ buttons_prev; - }; - - struct xwl_tablet_pad { --- -2.13.5 - diff --git a/0007-xfree86-Try-harder-to-find-atleast-1-non-GPU-Screen.patch b/0007-xfree86-Try-harder-to-find-atleast-1-non-GPU-Screen.patch deleted file mode 100644 index 75dda14..0000000 --- a/0007-xfree86-Try-harder-to-find-atleast-1-non-GPU-Screen.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 02bcb6f189c4ad8b2e73ce99cfa3c10f0c244a88 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 30 Sep 2016 12:29:09 +0200 -Subject: [PATCH xserver v2 7/7] xfree86: Try harder to find atleast 1 non GPU - Screen - -If we did not find any non GPU Screens, try again ignoring the notion -of any video devices being the primary device. This fixes Xorg exiting -with a "no screens found" error when using virtio-vga in a -virtual-machine and when using a device driven by simpledrm. - -This is a somewhat ugly solution, but it is the best I can come up with -without major surgery to the bus and probe code. - -Signed-off-by: Hans de Goede ---- - hw/xfree86/common/xf86.h | 1 + - hw/xfree86/common/xf86Bus.c | 26 +++++++++++++++++++++++--- - hw/xfree86/common/xf86Globals.c | 1 + - hw/xfree86/common/xf86pciBus.c | 4 ++++ - hw/xfree86/common/xf86platformBus.c | 4 ++++ - 5 files changed, 33 insertions(+), 3 deletions(-) - -diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h -index e54c811..f724688 100644 ---- a/hw/xfree86/common/xf86.h -+++ b/hw/xfree86/common/xf86.h -@@ -55,6 +55,7 @@ - extern _X_EXPORT int xf86DoConfigure; - extern _X_EXPORT int xf86DoShowOptions; - extern _X_EXPORT Bool xf86DoConfigurePass1; -+extern _X_EXPORT Bool xf86ProbeIgnorePrimary; - extern _X_EXPORT Bool xorgHWAccess; - - extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec; -diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c -index a3a9898..9836803 100644 ---- a/hw/xfree86/common/xf86Bus.c -+++ b/hw/xfree86/common/xf86Bus.c -@@ -117,14 +117,34 @@ xf86BusConfig(void) - int i, j; - - /* -- * Now call each of the Probe functions. Each successful probe will -- * result in an extra entry added to the xf86Screens[] list for each -- * instance of the hardware found. -+ * 3 step probe to (hopefully) ensure that we always find at least 1 -+ * (non GPU) screen: -+ * -+ * 1. Call each drivers probe function normally, -+ * Each successful probe will result in an extra entry added to the -+ * xf86Screens[] list for each instance of the hardware found. - */ - for (i = 0; i < xf86NumDrivers; i++) { - xf86CallDriverProbe(xf86DriverList[i], FALSE); - } - -+ /* -+ * 2. If no Screens were found, call each drivers probe function with -+ * ignorePrimary = TRUE, to ensure that we do actually get a -+ * Screen if there is atleast one supported video card. -+ */ -+ if (xf86NumScreens == 0) { -+ xf86ProbeIgnorePrimary = TRUE; -+ for (i = 0; i < xf86NumDrivers && xf86NumScreens == 0; i++) { -+ xf86CallDriverProbe(xf86DriverList[i], FALSE); -+ } -+ xf86ProbeIgnorePrimary = FALSE; -+ } -+ -+ /* -+ * 3. Call xf86platformAddGPUDevices() to add any additional video cards as -+ * GPUScreens (GPUScreens are only supported by platformBus drivers). -+ */ - for (i = 0; i < xf86NumDrivers; i++) { - xf86platformAddGPUDevices(xf86DriverList[i]); - } -diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c -index 07cfabf..e962b75 100644 ---- a/hw/xfree86/common/xf86Globals.c -+++ b/hw/xfree86/common/xf86Globals.c -@@ -152,6 +152,7 @@ XF86ConfigPtr xf86configptr = NULL; - Bool xf86Resetting = FALSE; - Bool xf86Initialising = FALSE; - Bool xf86DoConfigure = FALSE; -+Bool xf86ProbeIgnorePrimary = FALSE; - Bool xf86DoShowOptions = FALSE; - DriverPtr *xf86DriverList = NULL; - int xf86NumDrivers = 0; -diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c -index 8158c2b..9adfee5 100644 ---- a/hw/xfree86/common/xf86pciBus.c -+++ b/hw/xfree86/common/xf86pciBus.c -@@ -352,6 +352,10 @@ xf86ComparePciBusString(const char *busID, int bus, int device, int func) - Bool - xf86IsPrimaryPci(struct pci_device *pPci) - { -+ /* Add max. 1 screen for the IgnorePrimary fallback path */ -+ if (xf86ProbeIgnorePrimary && xf86NumScreens == 0) -+ return TRUE; -+ - if (primaryBus.type == BUS_PCI) - return pPci == primaryBus.id.pci; - #ifdef XSERVER_PLATFORM_BUS -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index 8dd0d5d..063e81c 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -114,6 +114,10 @@ xf86_find_platform_device_by_devnum(int major, int minor) - static Bool - xf86IsPrimaryPlatform(struct xf86_platform_device *plat) - { -+ /* Add max. 1 screen for the IgnorePrimary fallback path */ -+ if (xf86ProbeIgnorePrimary && xf86NumScreens == 0) -+ return TRUE; -+ - if (primaryBus.type == BUS_PLATFORM) - return plat == primaryBus.id.plat; - #ifdef XSERVER_LIBPCIACCESS --- -2.9.3 - diff --git a/0007-xwayland-Refactor-cursor-management-into-xwl_cursor.patch b/0007-xwayland-Refactor-cursor-management-into-xwl_cursor.patch deleted file mode 100644 index c3bcd11..0000000 --- a/0007-xwayland-Refactor-cursor-management-into-xwl_cursor.patch +++ /dev/null @@ -1,213 +0,0 @@ -From 94a88b752a9373656bb0f62897513c8f5e552127 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Fri, 4 Nov 2016 19:36:10 +0100 -Subject: [PATCH xserver 07/12] xwayland: Refactor cursor management into - xwl_cursor - -This struct takes away the cursor info in xwl_seat, and has -an update function so we can share the frame handling code -across several xwl_cursors. - -Signed-off-by: Carlos Garnacho -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Acked-by: Ping Cheng -(cherry picked from commit 6d1ad39fe6c18220dd39b0653fd1e4145140e2dc) ---- - hw/xwayland/xwayland-cursor.c | 39 ++++++++++++++++++++------------------- - hw/xwayland/xwayland-input.c | 38 +++++++++++++++++++++++++++++++------- - hw/xwayland/xwayland.h | 11 ++++++++--- - 3 files changed, 59 insertions(+), 29 deletions(-) - -diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c -index f334f1ca5..fdae3ce85 100644 ---- a/hw/xwayland/xwayland-cursor.c -+++ b/hw/xwayland/xwayland-cursor.c -@@ -96,11 +96,11 @@ xwl_unrealize_cursor(DeviceIntPtr device, ScreenPtr screen, CursorPtr cursor) - } - - static void --clear_cursor_frame_callback(struct xwl_seat *xwl_seat) -+clear_cursor_frame_callback(struct xwl_cursor *xwl_cursor) - { -- if (xwl_seat->cursor_frame_cb) { -- wl_callback_destroy (xwl_seat->cursor_frame_cb); -- xwl_seat->cursor_frame_cb = NULL; -+ if (xwl_cursor->frame_cb) { -+ wl_callback_destroy (xwl_cursor->frame_cb); -+ xwl_cursor->frame_cb = NULL; - } - } - -@@ -109,12 +109,12 @@ frame_callback(void *data, - struct wl_callback *callback, - uint32_t time) - { -- struct xwl_seat *xwl_seat = data; -+ struct xwl_cursor *xwl_cursor = data; - -- clear_cursor_frame_callback(xwl_seat); -- if (xwl_seat->cursor_needs_update) { -- xwl_seat->cursor_needs_update = FALSE; -- xwl_seat_set_cursor(xwl_seat); -+ clear_cursor_frame_callback(xwl_cursor); -+ if (xwl_cursor->needs_update) { -+ xwl_cursor->needs_update = FALSE; -+ xwl_cursor->update_proc(xwl_cursor); - } - } - -@@ -125,6 +125,7 @@ static const struct wl_callback_listener frame_listener = { - void - xwl_seat_set_cursor(struct xwl_seat *xwl_seat) - { -+ struct xwl_cursor *xwl_cursor = &xwl_seat->cursor; - PixmapPtr pixmap; - CursorPtr cursor; - int stride; -@@ -135,13 +136,13 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat) - if (!xwl_seat->x_cursor) { - wl_pointer_set_cursor(xwl_seat->wl_pointer, - xwl_seat->pointer_enter_serial, NULL, 0, 0); -- clear_cursor_frame_callback(xwl_seat); -- xwl_seat->cursor_needs_update = FALSE; -+ clear_cursor_frame_callback(xwl_cursor); -+ xwl_cursor->needs_update = FALSE; - return; - } - -- if (xwl_seat->cursor_frame_cb) { -- xwl_seat->cursor_needs_update = TRUE; -+ if (xwl_cursor->frame_cb) { -+ xwl_cursor->needs_update = TRUE; - return; - } - -@@ -159,19 +160,19 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat) - - wl_pointer_set_cursor(xwl_seat->wl_pointer, - xwl_seat->pointer_enter_serial, -- xwl_seat->cursor, -+ xwl_cursor->surface, - xwl_seat->x_cursor->bits->xhot, - xwl_seat->x_cursor->bits->yhot); -- wl_surface_attach(xwl_seat->cursor, -+ wl_surface_attach(xwl_cursor->surface, - xwl_shm_pixmap_get_wl_buffer(pixmap), 0, 0); -- wl_surface_damage(xwl_seat->cursor, 0, 0, -+ wl_surface_damage(xwl_cursor->surface, 0, 0, - xwl_seat->x_cursor->bits->width, - xwl_seat->x_cursor->bits->height); - -- xwl_seat->cursor_frame_cb = wl_surface_frame(xwl_seat->cursor); -- wl_callback_add_listener(xwl_seat->cursor_frame_cb, &frame_listener, xwl_seat); -+ xwl_cursor->frame_cb = wl_surface_frame(xwl_cursor->surface); -+ wl_callback_add_listener(xwl_cursor->frame_cb, &frame_listener, xwl_cursor); - -- wl_surface_commit(xwl_seat->cursor); -+ wl_surface_commit(xwl_cursor->surface); - } - - static void -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index 50da10839..bb520e891 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -424,9 +424,9 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, - * of our surfaces might not have been shown. In that case we'll - * have a cursor surface frame callback pending which we need to - * clear so that we can continue submitting new cursor frames. */ -- if (xwl_seat->cursor_frame_cb) { -- wl_callback_destroy(xwl_seat->cursor_frame_cb); -- xwl_seat->cursor_frame_cb = NULL; -+ if (xwl_seat->cursor.frame_cb) { -+ wl_callback_destroy(xwl_seat->cursor.frame_cb); -+ xwl_seat->cursor.frame_cb = NULL; - xwl_seat_set_cursor(xwl_seat); - } - -@@ -1203,6 +1203,31 @@ static const struct wl_seat_listener seat_listener = { - }; - - static void -+xwl_cursor_init(struct xwl_cursor *xwl_cursor, struct xwl_screen *xwl_screen, -+ void (* update_proc)(struct xwl_cursor *)) -+{ -+ xwl_cursor->surface = wl_compositor_create_surface(xwl_screen->compositor); -+ xwl_cursor->update_proc = update_proc; -+ xwl_cursor->frame_cb = NULL; -+ xwl_cursor->needs_update = FALSE; -+} -+ -+static void -+xwl_cursor_release(struct xwl_cursor *xwl_cursor) -+{ -+ wl_surface_destroy(xwl_cursor->surface); -+ if (xwl_cursor->frame_cb) -+ wl_callback_destroy(xwl_cursor->frame_cb); -+} -+ -+static void -+xwl_seat_update_cursor(struct xwl_cursor *xwl_cursor) -+{ -+ struct xwl_seat *xwl_seat = wl_container_of(xwl_cursor, xwl_seat, cursor); -+ xwl_seat_set_cursor(xwl_seat); -+} -+ -+static void - create_input_device(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version) - { - struct xwl_seat *xwl_seat; -@@ -1221,7 +1246,8 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version - &wl_seat_interface, min(version, 5)); - xwl_seat->id = id; - -- xwl_seat->cursor = wl_compositor_create_surface(xwl_screen->compositor); -+ xwl_cursor_init(&xwl_seat->cursor, xwl_seat->xwl_screen, -+ xwl_seat_update_cursor); - wl_seat_add_listener(xwl_seat->seat, &seat_listener, xwl_seat); - - init_tablet_manager_seat(xwl_screen, xwl_seat); -@@ -1252,9 +1278,7 @@ xwl_seat_destroy(struct xwl_seat *xwl_seat) - release_tablet_manager_seat(xwl_seat); - - wl_seat_destroy(xwl_seat->seat); -- wl_surface_destroy(xwl_seat->cursor); -- if (xwl_seat->cursor_frame_cb) -- wl_callback_destroy(xwl_seat->cursor_frame_cb); -+ xwl_cursor_release(&xwl_seat->cursor); - wl_array_release(&xwl_seat->keys); - free(xwl_seat); - } -diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h -index bb119dad7..bfa5f47c7 100644 ---- a/hw/xwayland/xwayland.h -+++ b/hw/xwayland/xwayland.h -@@ -127,6 +127,13 @@ struct xwl_pointer_warp_emulator { - struct zwp_locked_pointer_v1 *locked_pointer; - }; - -+struct xwl_cursor { -+ void (* update_proc) (struct xwl_cursor *); -+ struct wl_surface *surface; -+ struct wl_callback *frame_cb; -+ Bool needs_update; -+}; -+ - struct xwl_seat { - DeviceIntPtr pointer; - DeviceIntPtr relative_pointer; -@@ -148,9 +155,7 @@ struct xwl_seat { - uint32_t pointer_enter_serial; - struct xorg_list link; - CursorPtr x_cursor; -- struct wl_surface *cursor; -- struct wl_callback *cursor_frame_cb; -- Bool cursor_needs_update; -+ struct xwl_cursor cursor; - WindowPtr last_xwindow; - - struct xorg_list touches; --- -2.13.5 - diff --git a/0008-xwayland-update-cursor-on-tablet-tools-in-proximity.patch b/0008-xwayland-update-cursor-on-tablet-tools-in-proximity.patch deleted file mode 100644 index fa5472c..0000000 --- a/0008-xwayland-update-cursor-on-tablet-tools-in-proximity.patch +++ /dev/null @@ -1,208 +0,0 @@ -From 78a4493bc8e60da7b97342660dd1ff6de844e951 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Fri, 4 Nov 2016 19:58:04 +0100 -Subject: [PATCH xserver 08/12] xwayland: update cursor on tablet tools in - proximity - -Each xwl_tablet_tool gets a xwl_cursor, as on wayland each of those -will get an independent cursor that can be set through -zwp_tablet_tool.set_cursor. - -However, all tools (and the pointer) share conceptually the same VCP -on Xwayland, so have cursor changes trigger a xwl_cursor update on -every tool (and the pointer, again). Maybe Xwayland could keep track -of the most recent device and only update that cursor to get better -visual results, but this is simpler, and it's going to be odd -anyway... - -Signed-off-by: Carlos Garnacho -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Acked-by: Ping Cheng -(cherry picked from commit f471b5b8eb451b442554517c7cb6f0aa90d218c4) ---- - hw/xwayland/xwayland-cursor.c | 56 +++++++++++++++++++++++++++++++++++++++++++ - hw/xwayland/xwayland-input.c | 17 +++++++++++++ - hw/xwayland/xwayland.h | 5 ++++ - 3 files changed, 78 insertions(+) - -diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c -index fdae3ce85..c95f4e830 100644 ---- a/hw/xwayland/xwayland-cursor.c -+++ b/hw/xwayland/xwayland-cursor.c -@@ -175,11 +175,62 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat) - wl_surface_commit(xwl_cursor->surface); - } - -+void -+xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *xwl_tablet_tool) -+{ -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ struct xwl_cursor *xwl_cursor = &xwl_tablet_tool->cursor; -+ PixmapPtr pixmap; -+ CursorPtr cursor; -+ int stride; -+ -+ if (!xwl_seat->x_cursor) { -+ zwp_tablet_tool_v2_set_cursor(xwl_tablet_tool->tool, -+ xwl_tablet_tool->proximity_in_serial, -+ NULL, 0, 0); -+ return; -+ } -+ -+ if (xwl_cursor->frame_cb) { -+ xwl_cursor->needs_update = TRUE; -+ return; -+ } -+ -+ cursor = xwl_seat->x_cursor; -+ pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key); -+ if (!pixmap) -+ return; -+ -+ stride = cursor->bits->width * 4; -+ if (cursor->bits->argb) -+ memcpy(pixmap->devPrivate.ptr, -+ cursor->bits->argb, cursor->bits->height * stride); -+ else -+ expand_source_and_mask(cursor, pixmap->devPrivate.ptr); -+ -+ zwp_tablet_tool_v2_set_cursor(xwl_tablet_tool->tool, -+ xwl_tablet_tool->proximity_in_serial, -+ xwl_cursor->surface, -+ xwl_seat->x_cursor->bits->xhot, -+ xwl_seat->x_cursor->bits->yhot); -+ wl_surface_attach(xwl_cursor->surface, -+ xwl_shm_pixmap_get_wl_buffer(pixmap), 0, 0); -+ wl_surface_damage(xwl_cursor->surface, 0, 0, -+ xwl_seat->x_cursor->bits->width, -+ xwl_seat->x_cursor->bits->height); -+ -+ xwl_cursor->frame_cb = wl_surface_frame(xwl_cursor->surface); -+ wl_callback_add_listener(xwl_cursor->frame_cb, &frame_listener, xwl_cursor); -+ -+ wl_surface_commit(xwl_cursor->surface); -+} -+ - static void - xwl_set_cursor(DeviceIntPtr device, - ScreenPtr screen, CursorPtr cursor, int x, int y) - { - struct xwl_seat *xwl_seat; -+ struct xwl_tablet_tool *xwl_tablet_tool; - Bool cursor_visibility_changed; - - xwl_seat = device->public.devicePrivate; -@@ -194,6 +245,11 @@ xwl_set_cursor(DeviceIntPtr device, - xwl_seat_cursor_visibility_changed(xwl_seat); - - xwl_seat_set_cursor(xwl_seat); -+ -+ xorg_list_for_each_entry(xwl_tablet_tool, &xwl_seat->tablet_tools, link) { -+ if (xwl_tablet_tool->proximity_in_serial != 0) -+ xwl_tablet_tool_set_cursor(xwl_tablet_tool); -+ } - } - - static void -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index bb520e891..77cd42789 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -1405,6 +1405,7 @@ tablet_tool_receive_removed(void *data, struct zwp_tablet_tool_v2 *tool) - struct xwl_tablet_tool *xwl_tablet_tool = data; - - xorg_list_del(&xwl_tablet_tool->link); -+ xwl_cursor_release(&xwl_tablet_tool->cursor); - zwp_tablet_tool_v2_destroy(tool); - free(xwl_tablet_tool); - } -@@ -1428,7 +1429,10 @@ tablet_tool_proximity_in(void *data, struct zwp_tablet_tool_v2 *tool, - if (wl_surface == NULL) - return; - -+ xwl_tablet_tool->proximity_in_serial = serial; - xwl_seat->focus_window = wl_surface_get_user_data(wl_surface); -+ -+ xwl_tablet_tool_set_cursor(xwl_tablet_tool); - } - - static void -@@ -1437,6 +1441,7 @@ tablet_tool_proximity_out(void *data, struct zwp_tablet_tool_v2 *tool) - struct xwl_tablet_tool *xwl_tablet_tool = data; - struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; - -+ xwl_tablet_tool->proximity_in_serial = 0; - xwl_seat->focus_window = NULL; - - xwl_tablet_tool->pressure = 0; -@@ -1717,10 +1722,20 @@ tablet_seat_handle_add_tablet(void *data, struct zwp_tablet_seat_v2 *tablet_seat - } - - static void -+xwl_tablet_tool_update_cursor(struct xwl_cursor *xwl_cursor) -+{ -+ struct xwl_tablet_tool *xwl_tablet_tool = wl_container_of(xwl_cursor, -+ xwl_tablet_tool, -+ cursor); -+ xwl_tablet_tool_set_cursor(xwl_tablet_tool); -+} -+ -+static void - tablet_seat_handle_add_tool(void *data, struct zwp_tablet_seat_v2 *tablet_seat, - struct zwp_tablet_tool_v2 *tool) - { - struct xwl_seat *xwl_seat = data; -+ struct xwl_screen *xwl_screen = xwl_seat->xwl_screen; - struct xwl_tablet_tool *xwl_tablet_tool; - - xwl_tablet_tool = calloc(sizeof *xwl_tablet_tool, 1); -@@ -1731,6 +1746,8 @@ tablet_seat_handle_add_tool(void *data, struct zwp_tablet_seat_v2 *tablet_seat, - - xwl_tablet_tool->tool = tool; - xwl_tablet_tool->seat = xwl_seat; -+ xwl_cursor_init(&xwl_tablet_tool->cursor, xwl_screen, -+ xwl_tablet_tool_update_cursor); - - xorg_list_add(&xwl_tablet_tool->link, &xwl_seat->tablet_tools); - -diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h -index bfa5f47c7..02a218c43 100644 ---- a/hw/xwayland/xwayland.h -+++ b/hw/xwayland/xwayland.h -@@ -44,6 +44,7 @@ - - #include "relative-pointer-unstable-v1-client-protocol.h" - #include "pointer-constraints-unstable-v1-client-protocol.h" -+#include "tablet-unstable-v2-client-protocol.h" - - struct xwl_screen { - int width; -@@ -200,6 +201,7 @@ struct xwl_tablet_tool { - struct xwl_seat *seat; - - DeviceIntPtr xdevice; -+ uint32_t proximity_in_serial; - uint32_t x; - uint32_t y; - uint32_t pressure; -@@ -210,6 +212,8 @@ struct xwl_tablet_tool { - - uint32_t buttons_now, - buttons_prev; -+ -+ struct xwl_cursor cursor; - }; - - struct xwl_tablet_pad { -@@ -237,6 +241,7 @@ Bool xwl_screen_init_cursor(struct xwl_screen *xwl_screen); - - struct xwl_screen *xwl_screen_get(ScreenPtr screen); - -+void xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *tool); - void xwl_seat_set_cursor(struct xwl_seat *xwl_seat); - - void xwl_seat_destroy(struct xwl_seat *xwl_seat); --- -2.13.5 - diff --git a/0009-xwayland-add-tablet-pad-support.patch b/0009-xwayland-add-tablet-pad-support.patch deleted file mode 100644 index 8158d92..0000000 --- a/0009-xwayland-add-tablet-pad-support.patch +++ /dev/null @@ -1,511 +0,0 @@ -From 6f79f4993d351a891a715e994ab9574542e64b35 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 7 Feb 2017 15:04:46 +1000 -Subject: [PATCH xserver 09/12] xwayland: add tablet pad support - -Hooked up a bit differently to the other tools. Those tools can be static for -all and be re-used. The wacom driver initializes the pad with the correct -number of buttons though and we can't do this until we have the pad done event. - -If the tablet is removed and we plug a different one in, we should initialize -that correctly, so unlike the other tools the pad is properly removed and -re-initialized on plug. - -Signed-off-by: Peter Hutterer -Acked-by: Ping Cheng -(cherry picked from commit 8475e6360ce31551d50fd63a26f7a44d1e8928f2) ---- - hw/xwayland/xwayland-input.c | 417 +++++++++++++++++++++++++++++++++++++++++++ - hw/xwayland/xwayland.h | 28 +++ - 2 files changed, 445 insertions(+) - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index 77cd42789..8011b965c 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -1341,6 +1341,7 @@ tablet_handle_removed(void *data, struct zwp_tablet_v2 *tablet) - DisableDevice(xwl_seat->eraser, TRUE); - if (xwl_seat->puck) - DisableDevice(xwl_seat->puck, TRUE); -+ /* pads are removed separately */ - } - - zwp_tablet_v2_destroy(tablet); -@@ -1701,6 +1702,418 @@ static const struct zwp_tablet_tool_v2_listener tablet_tool_listener = { - }; - - static void -+tablet_pad_ring_destroy(struct xwl_tablet_pad_ring *ring) -+{ -+ zwp_tablet_pad_ring_v2_destroy(ring->ring); -+ xorg_list_del(&ring->link); -+ free(ring); -+} -+ -+static void -+tablet_pad_ring_source(void *data, -+ struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2, -+ uint32_t source) -+{ -+} -+ -+static void -+tablet_pad_ring_angle(void *data, -+ struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2, -+ wl_fixed_t degrees) -+{ -+ struct xwl_tablet_pad_ring *ring = data; -+ struct xwl_tablet_pad *pad = ring->group->pad; -+ double deg = wl_fixed_to_double(degrees); -+ ValuatorMask mask; -+ -+ valuator_mask_zero(&mask); -+ valuator_mask_set(&mask, 5 + ring->index, deg/360.0 * 71); -+ QueuePointerEvents(pad->xdevice, MotionNotify, 0, 0, &mask); -+} -+ -+static void -+tablet_pad_ring_stop(void *data, -+ struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2) -+{ -+} -+ -+static void -+tablet_pad_ring_frame(void *data, -+ struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2, -+ uint32_t time) -+{ -+} -+ -+static const struct zwp_tablet_pad_ring_v2_listener tablet_pad_ring_listener = { -+ tablet_pad_ring_source, -+ tablet_pad_ring_angle, -+ tablet_pad_ring_stop, -+ tablet_pad_ring_frame, -+}; -+ -+ -+static void -+tablet_pad_strip_destroy(struct xwl_tablet_pad_strip *strip) -+{ -+ zwp_tablet_pad_strip_v2_destroy(strip->strip); -+ xorg_list_del(&strip->link); -+ free(strip); -+} -+ -+static void -+tablet_pad_strip_source(void *data, -+ struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2, -+ uint32_t source) -+{ -+} -+ -+static void -+tablet_pad_strip_position(void *data, -+ struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2, -+ uint32_t position) -+{ -+ struct xwl_tablet_pad_strip *strip = data; -+ struct xwl_tablet_pad *pad = strip->group->pad; -+ ValuatorMask mask; -+ -+ valuator_mask_zero(&mask); -+ valuator_mask_set(&mask, 3 + strip->index, position/65535.0 * 2048); -+ QueuePointerEvents(pad->xdevice, MotionNotify, 0, 0, &mask); -+} -+ -+static void -+tablet_pad_strip_stop(void *data, -+ struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2) -+{ -+} -+ -+static void -+tablet_pad_strip_frame(void *data, -+ struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2, -+ uint32_t time) -+{ -+} -+ -+static const struct zwp_tablet_pad_strip_v2_listener tablet_pad_strip_listener = { -+ tablet_pad_strip_source, -+ tablet_pad_strip_position, -+ tablet_pad_strip_stop, -+ tablet_pad_strip_frame, -+}; -+ -+static void -+tablet_pad_group_destroy(struct xwl_tablet_pad_group *group) -+{ -+ struct xwl_tablet_pad_ring *r, *tr; -+ struct xwl_tablet_pad_strip *s, *ts; -+ -+ xorg_list_for_each_entry_safe(r, tr, -+ &group->pad_group_ring_list, -+ link) -+ tablet_pad_ring_destroy(r); -+ -+ xorg_list_for_each_entry_safe(s, ts, -+ &group->pad_group_strip_list, -+ link) -+ tablet_pad_strip_destroy(s); -+ -+ zwp_tablet_pad_group_v2_destroy(group->group); -+ xorg_list_del(&group->link); -+ free(group); -+} -+ -+static void -+tablet_pad_group_buttons(void *data, -+ struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, -+ struct wl_array *buttons) -+{ -+ -+} -+ -+static void -+tablet_pad_group_ring(void *data, -+ struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, -+ struct zwp_tablet_pad_ring_v2 *wp_ring) -+{ -+ static unsigned int ring_index = 0; -+ struct xwl_tablet_pad_group *group = data; -+ struct xwl_tablet_pad_ring *ring; -+ -+ ring = calloc(1, sizeof *ring); -+ if (ring == NULL) { -+ ErrorF("%s ENOMEM\n", __func__); -+ return; -+ } -+ -+ ring->index = ring_index++; -+ ring->group = group; -+ ring->ring = wp_ring; -+ -+ xorg_list_add(&ring->link, &group->pad_group_ring_list); -+ -+ zwp_tablet_pad_ring_v2_add_listener(wp_ring, &tablet_pad_ring_listener, -+ ring); -+} -+ -+static void -+tablet_pad_group_strip(void *data, -+ struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, -+ struct zwp_tablet_pad_strip_v2 *wp_strip) -+{ -+ static unsigned int strip_index = 0; -+ struct xwl_tablet_pad_group *group = data; -+ struct xwl_tablet_pad_strip *strip; -+ -+ strip = calloc(1, sizeof *strip); -+ if (strip == NULL) { -+ ErrorF("%s ENOMEM\n", __func__); -+ return; -+ } -+ -+ strip->index = strip_index++; -+ strip->group = group; -+ strip->strip = wp_strip; -+ -+ xorg_list_add(&strip->link, &group->pad_group_strip_list); -+ -+ zwp_tablet_pad_strip_v2_add_listener(wp_strip, &tablet_pad_strip_listener, -+ strip); -+} -+ -+static void -+tablet_pad_group_modes(void *data, -+ struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, -+ uint32_t modes) -+{ -+ -+} -+ -+static void -+tablet_pad_group_done(void *data, -+ struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2) -+{ -+ -+} -+ -+static void -+tablet_pad_group_mode_switch(void *data, -+ struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, -+ uint32_t time, -+ uint32_t serial, -+ uint32_t mode) -+{ -+ -+} -+ -+static struct zwp_tablet_pad_group_v2_listener tablet_pad_group_listener = { -+ tablet_pad_group_buttons, -+ tablet_pad_group_ring, -+ tablet_pad_group_strip, -+ tablet_pad_group_modes, -+ tablet_pad_group_done, -+ tablet_pad_group_mode_switch, -+}; -+ -+static int -+xwl_tablet_pad_proc(DeviceIntPtr device, int what) -+{ -+ struct xwl_tablet_pad *pad = device->public.devicePrivate; -+ /* Axis layout mirrors that of xf86-input-wacom to have better -+ compatibility with existing clients */ -+#define NAXES 7 -+ Atom axes_labels[NAXES] = { 0 }; -+ BYTE map[MAX_BUTTONS + 1]; -+ int i = 0; -+ Atom btn_labels[MAX_BUTTONS] = { 0 }; /* btn labels are meaningless */ -+ int nbuttons; -+ -+ switch (what) { -+ case DEVICE_INIT: -+ device->public.on = FALSE; -+ -+ axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X); -+ axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y); -+ /* The others have no good mapping */ -+ -+ if (!InitValuatorClassDeviceStruct(device, NAXES, axes_labels, -+ GetMotionHistorySize(), Absolute)) -+ return BadValue; -+ -+ for (i = 1; i <= MAX_BUTTONS; i++) -+ map[i] = i; -+ -+ /* We need at least 7 buttons to allow scrolling */ -+ nbuttons = min(max(pad->nbuttons + 4, 7), MAX_BUTTONS); -+ -+ if (!InitButtonClassDeviceStruct(device, nbuttons, -+ btn_labels, map)) -+ return BadValue; -+ -+ /* Valuators */ -+ InitValuatorAxisStruct(device, 0, axes_labels[0], -+ 0, 100, 1, 0, 1, Absolute); -+ InitValuatorAxisStruct(device, 1, axes_labels[1], -+ 0, 100, 1, 0, 1, Absolute); -+ /* Pressure - unused, for backwards compat only */ -+ InitValuatorAxisStruct(device, 2, axes_labels[2], -+ 0, 2048, 1, 0, 1, Absolute); -+ /* strip x */ -+ InitValuatorAxisStruct(device, 3, axes_labels[3], -+ 0, 2048, 1, 0, 1, Absolute); -+ /* strip y */ -+ InitValuatorAxisStruct(device, 4, axes_labels[4], -+ 0, 2048, 1, 0, 1, Absolute); -+ /* ring */ -+ InitValuatorAxisStruct(device, 5, axes_labels[5], -+ 0, 71, 1, 0, 1, Absolute); -+ /* ring2 */ -+ InitValuatorAxisStruct(device, 6, axes_labels[6], -+ 0, 71, 1, 0, 1, Absolute); -+ -+ if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control)) -+ return BadValue; -+ -+ return Success; -+ -+ case DEVICE_ON: -+ device->public.on = TRUE; -+ return Success; -+ -+ case DEVICE_OFF: -+ case DEVICE_CLOSE: -+ device->public.on = FALSE; -+ return Success; -+ } -+ -+ return BadMatch; -+#undef NAXES -+} -+ -+static void -+tablet_pad_group(void *data, -+ struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, -+ struct zwp_tablet_pad_group_v2 *pad_group) -+{ -+ struct xwl_tablet_pad *pad = data; -+ struct xwl_tablet_pad_group *group; -+ -+ group = calloc(1, sizeof *group); -+ if (pad == NULL) { -+ ErrorF("%s ENOMEM\n", __func__); -+ return; -+ } -+ -+ group->pad = pad; -+ group->group = pad_group; -+ xorg_list_init(&group->pad_group_ring_list); -+ xorg_list_init(&group->pad_group_strip_list); -+ -+ xorg_list_add(&group->link, &pad->pad_group_list); -+ -+ zwp_tablet_pad_group_v2_add_listener(pad_group, -+ &tablet_pad_group_listener, -+ group); -+} -+ -+static void -+tablet_pad_path(void *data, -+ struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, -+ const char *path) -+{ -+ -+} -+ -+static void -+tablet_pad_buttons(void *data, -+ struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, -+ uint32_t buttons) -+{ -+ struct xwl_tablet_pad *pad = data; -+ -+ pad->nbuttons = buttons; -+} -+ -+static void -+tablet_pad_done(void *data, -+ struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2) -+{ -+ struct xwl_tablet_pad *pad = data; -+ -+ pad->xdevice = add_device(pad->seat, "xwayland-pad", -+ xwl_tablet_pad_proc); -+ pad->xdevice->public.devicePrivate = pad; -+ ActivateDevice(pad->xdevice, TRUE); -+ EnableDevice(pad->xdevice, TRUE); -+} -+ -+static void -+tablet_pad_button(void *data, -+ struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, -+ uint32_t time, -+ uint32_t button, -+ uint32_t state) -+{ -+ struct xwl_tablet_pad *pad = data; -+ ValuatorMask mask; -+ -+ button++; /* wayland index vs X's 1-offset */ -+ /* skip scroll wheel buttons 4-7 */ -+ button = button > 3 ? button + 4 : button; -+ -+ valuator_mask_zero(&mask); -+ QueuePointerEvents(pad->xdevice, -+ state ? ButtonPress : ButtonRelease, button, 0, &mask); -+} -+ -+static void -+tablet_pad_enter(void *data, -+ struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, -+ uint32_t serial, -+ struct zwp_tablet_v2 *tablet, -+ struct wl_surface *surface) -+{ -+ /* pairs the pad with the tablet but also to set the focus. We -+ * don't care about the pairing and always use X's focus */ -+} -+ -+static void -+tablet_pad_leave(void *data, -+ struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, -+ uint32_t serial, -+ struct wl_surface *surface) -+{ -+ /* pairs the pad with the tablet but also to set the focus. We -+ * don't care about the pairing and always use X's focus */ -+} -+ -+static void -+tablet_pad_removed(void *data, -+ struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2) -+{ -+ struct xwl_tablet_pad *pad = data; -+ struct xwl_tablet_pad_group *g, *tg; -+ -+ xorg_list_for_each_entry_safe(g, tg, &pad->pad_group_list, link) -+ tablet_pad_group_destroy(g); -+ -+ RemoveDevice(pad->xdevice, TRUE); -+ xorg_list_del(&pad->link); -+ zwp_tablet_pad_v2_destroy(pad->pad); -+ free(pad); -+} -+ -+static const struct zwp_tablet_pad_v2_listener tablet_pad_listener = { -+ tablet_pad_group, -+ tablet_pad_path, -+ tablet_pad_buttons, -+ tablet_pad_done, -+ tablet_pad_button, -+ tablet_pad_enter, -+ tablet_pad_leave, -+ tablet_pad_removed, -+}; -+ -+static void - tablet_seat_handle_add_tablet(void *data, struct zwp_tablet_seat_v2 *tablet_seat, - struct zwp_tablet_v2 *tablet) - { -@@ -1769,8 +2182,12 @@ tablet_seat_handle_add_pad(void *data, struct zwp_tablet_seat_v2 *tablet_seat, - - xwl_tablet_pad->pad = pad; - xwl_tablet_pad->seat = xwl_seat; -+ xorg_list_init(&xwl_tablet_pad->pad_group_list); - - xorg_list_add(&xwl_tablet_pad->link, &xwl_seat->tablet_pads); -+ -+ zwp_tablet_pad_v2_add_listener(pad, &tablet_pad_listener, -+ xwl_tablet_pad); - } - - static const struct zwp_tablet_seat_v2_listener tablet_seat_listener = { -diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h -index 02a218c43..250564f73 100644 ---- a/hw/xwayland/xwayland.h -+++ b/hw/xwayland/xwayland.h -@@ -216,10 +216,38 @@ struct xwl_tablet_tool { - struct xwl_cursor cursor; - }; - -+struct xwl_tablet_pad_ring { -+ unsigned int index; -+ struct xorg_list link; -+ struct xwl_tablet_pad_group *group; -+ struct zwp_tablet_pad_ring_v2 *ring; -+}; -+ -+struct xwl_tablet_pad_strip { -+ unsigned int index; -+ struct xorg_list link; -+ struct xwl_tablet_pad_group *group; -+ struct zwp_tablet_pad_strip_v2 *strip; -+}; -+ -+struct xwl_tablet_pad_group { -+ struct xorg_list link; -+ struct xwl_tablet_pad *pad; -+ struct zwp_tablet_pad_group_v2 *group; -+ -+ struct xorg_list pad_group_ring_list; -+ struct xorg_list pad_group_strip_list; -+}; -+ - struct xwl_tablet_pad { - struct xorg_list link; - struct zwp_tablet_pad_v2 *pad; - struct xwl_seat *seat; -+ -+ DeviceIntPtr xdevice; -+ -+ unsigned int nbuttons; -+ struct xorg_list pad_group_list; - }; - - struct xwl_output { --- -2.13.5 - diff --git a/0010-xwayland-Unconditionally-initialize-lists-in-init_ta.patch b/0010-xwayland-Unconditionally-initialize-lists-in-init_ta.patch deleted file mode 100644 index 739b5a4..0000000 --- a/0010-xwayland-Unconditionally-initialize-lists-in-init_ta.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 81d85fb95d71c0d781328506f1417e7b92c68b97 Mon Sep 17 00:00:00 2001 -From: Lyude -Date: Thu, 4 May 2017 18:04:31 -0400 -Subject: [PATCH xserver 10/12] xwayland: Unconditionally initialize lists in - init_tablet_manager_seat() - -In the event that xwayland gets launched on a wayland compositor that -doesn't yet have support for wp_tablet_manager, we end up skipping the -initialization of the lists. This is wrong, because regardless of -whether or not a tablet is present we still attempt to traverse these -lists later in xwl_set_cursor(), expecting that if the lists are empty -from no tablet manager that we simply won't execute any loop iterations. - -(EE) -(EE) Backtrace: -(EE) 0: Xwayland (OsSigHandler+0x3b) [0x4982f9] -(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7f73722545bf] -(EE) 2: Xwayland (xwl_set_cursor+0x9f) [0x429974] -(EE) 3: Xwayland (miPointerUpdateSprite+0x261) [0x4fe1ca] -(EE) 4: Xwayland (mieqProcessInputEvents+0x239) [0x4f8d33] -(EE) 5: Xwayland (ProcessInputEvents+0x9) [0x4282f0] -(EE) 6: Xwayland (Dispatch+0x42) [0x43e2d4] -(EE) 7: Xwayland (dix_main+0x5c9) [0x44c6dc] -(EE) 8: Xwayland (main+0x28) [0x61c523] -(EE) 9: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x7f7371e9d401] -(EE) 10: Xwayland (_start+0x2a) [0x4208fa] -(EE) 11: ? (?+0x2a) [0x2a] -(EE) -(EE) Segmentation fault at address 0x28 -(EE) -Fatal server error: -(EE) Caught signal 11 (Segmentation fault). Server aborting -(EE) - -Reproduced when trying to run upstream xwayland under fedora 25's weston -package. - -Signed-off-by: Lyude -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -(cherry picked from commit a06bb73053d9df56d9070ce325a43af3a3c7a6a2) ---- - hw/xwayland/xwayland-input.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index 8011b965c..ee932be60 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -2200,6 +2200,10 @@ static void - init_tablet_manager_seat(struct xwl_screen *xwl_screen, - struct xwl_seat *xwl_seat) - { -+ xorg_list_init(&xwl_seat->tablets); -+ xorg_list_init(&xwl_seat->tablet_tools); -+ xorg_list_init(&xwl_seat->tablet_pads); -+ - if (!xwl_screen->tablet_manager) - return; - -@@ -2207,10 +2211,6 @@ init_tablet_manager_seat(struct xwl_screen *xwl_screen, - zwp_tablet_manager_v2_get_tablet_seat(xwl_screen->tablet_manager, - xwl_seat->seat); - -- xorg_list_init(&xwl_seat->tablets); -- xorg_list_init(&xwl_seat->tablet_tools); -- xorg_list_init(&xwl_seat->tablet_pads); -- - zwp_tablet_seat_v2_add_listener(xwl_seat->tablet_seat, &tablet_seat_listener, xwl_seat); - } - --- -2.13.5 - diff --git a/0011-xwayland-Correct-off-by-one-error-in-tablet-button-n.patch b/0011-xwayland-Correct-off-by-one-error-in-tablet-button-n.patch deleted file mode 100644 index 76e95ec..0000000 --- a/0011-xwayland-Correct-off-by-one-error-in-tablet-button-n.patch +++ /dev/null @@ -1,39 +0,0 @@ -From edcc95e914079485b7d693cecbfc436d084ad47d Mon Sep 17 00:00:00 2001 -From: Jason Gerecke -Date: Fri, 9 Jun 2017 16:02:06 -0700 -Subject: [PATCH xserver 11/12] xwayland: Correct off-by-one error in tablet - button numbering - -The 'tablet_tool_frame' function treats the button masks as though they -are zero-indexed, but 'tablet_tool_button_state' treats them as one- -indexed. The result is that an e.g. middle click event recieved from -Wayland will be sent from the X server as a right-click instead. - -Fixes: 773b04748d0 ("xwayland: handle button events after motion events") -Signed-off-by: Jason Gerecke -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -(cherry picked from commit fbc9814975fe82be25becf1a55d4f8d34298a956) ---- - hw/xwayland/xwayland-input.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index ee932be60..a6d7d9356 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -1626,9 +1626,9 @@ tablet_tool_button_state(void *data, struct zwp_tablet_tool_v2 *tool, - BUG_RETURN(xbtn >= 8 * sizeof(*mask)); - - if (state) -- SetBit(mask, xbtn); -+ SetBit(mask, xbtn - 1); - else -- ClearBit(mask, xbtn); -+ ClearBit(mask, xbtn - 1); - - xwl_seat->xwl_screen->serial = serial; - } --- -2.13.5 - diff --git a/0012-xwayland-Implement-tablet_tool_wheel-for-scrolling.patch b/0012-xwayland-Implement-tablet_tool_wheel-for-scrolling.patch deleted file mode 100644 index 097bcb4..0000000 --- a/0012-xwayland-Implement-tablet_tool_wheel-for-scrolling.patch +++ /dev/null @@ -1,78 +0,0 @@ -From d03bf0d1759d7d113216a0311e794b5adb0845de Mon Sep 17 00:00:00 2001 -From: Jason Gerecke -Date: Fri, 9 Jun 2017 16:02:07 -0700 -Subject: [PATCH xserver 12/12] xwayland: Implement tablet_tool_wheel for - scrolling - -The 'tablet_tool_wheel' function for tablet scrolling was added back in -8a1defcc634 but left unimplemented. This commit fills in the necessary -details, using the "clicks" count as the number of discrete scroll up/down -events to send. - -Signed-off-by: Jason Gerecke -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -(cherry picked from commit 7c7a540f1e1d6b5466e1c9aa28476a2d7273d5ed) ---- - hw/xwayland/xwayland-input.c | 24 ++++++++++++++++++++++++ - hw/xwayland/xwayland.h | 2 ++ - 2 files changed, 26 insertions(+) - -diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c -index a6d7d9356..0cf318623 100644 ---- a/hw/xwayland/xwayland-input.c -+++ b/hw/xwayland/xwayland-input.c -@@ -1566,6 +1566,13 @@ static void - tablet_tool_wheel(void *data, struct zwp_tablet_tool_v2 *tool, - wl_fixed_t degrees, int32_t clicks) - { -+ struct xwl_tablet_tool *xwl_tablet_tool = data; -+ struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; -+ -+ if (!xwl_seat->focus_window) -+ return; -+ -+ xwl_tablet_tool->wheel_clicks = clicks; - } - - static void -@@ -1677,6 +1684,23 @@ tablet_tool_frame(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t time) - } - - xwl_tablet_tool->buttons_prev = xwl_tablet_tool->buttons_now; -+ -+ while (xwl_tablet_tool->wheel_clicks) { -+ if (xwl_tablet_tool->wheel_clicks < 0) { -+ button = 4; -+ xwl_tablet_tool->wheel_clicks++; -+ } -+ else { -+ button = 5; -+ xwl_tablet_tool->wheel_clicks--; -+ } -+ -+ QueuePointerEvents(xwl_tablet_tool->xdevice, -+ ButtonPress, button, 0, &mask); -+ QueuePointerEvents(xwl_tablet_tool->xdevice, -+ ButtonRelease, button, 0, &mask); -+ -+ } - } - - static const struct zwp_tablet_tool_v2_listener tablet_tool_listener = { -diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h -index 250564f73..135aa8761 100644 ---- a/hw/xwayland/xwayland.h -+++ b/hw/xwayland/xwayland.h -@@ -213,6 +213,8 @@ struct xwl_tablet_tool { - uint32_t buttons_now, - buttons_prev; - -+ int32_t wheel_clicks; -+ - struct xwl_cursor cursor; - }; - --- -2.13.5 - diff --git a/10-quirks.conf b/10-quirks.conf deleted file mode 100644 index 47907d8..0000000 --- a/10-quirks.conf +++ /dev/null @@ -1,38 +0,0 @@ -# Collection of quirks and blacklist/whitelists for specific devices. - - -# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable -# http://bugs.freedesktop.org/show_bug.cgi?id=22442 -Section "InputClass" - Identifier "ThinkPad HDAPS accelerometer blacklist" - MatchProduct "ThinkPad HDAPS accelerometer data" - Option "Ignore" "on" -EndSection - -# https://bugzilla.redhat.com/show_bug.cgi?id=523914 -# Mouse does not move in PV Xen guest -# Explicitly tell evdev to not ignore the absolute axes. -Section "InputClass" - Identifier "Xen Virtual Pointer axis blacklist" - MatchProduct "Xen Virtual Pointer" - Option "IgnoreAbsoluteAxes" "off" - Option "IgnoreRelativeAxes" "off" -EndSection - -# https://bugs.freedesktop.org/show_bug.cgi?id=55867 -# Bug 55867 - Doesn't know how to tag XI_TRACKBALL -Section "InputClass" - Identifier "Tag trackballs as XI_TRACKBALL" - MatchProduct "trackball" - MatchDriver "evdev" - Option "TypeName" "TRACKBALL" -EndSection - -# https://bugs.freedesktop.org/show_bug.cgi?id=62831 -# Bug 62831 - Mionix Naos 5000 mouse detected incorrectly -Section "InputClass" - Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE" - MatchProduct "La-VIEW Technology Naos 5000 Mouse" - MatchDriver "evdev" - Option "TypeName" "MOUSE" -EndSection diff --git a/Makefile b/Makefile deleted file mode 100644 index 4041668..0000000 --- a/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Makefile for source rpm: xorg-x11-server -# $Id$ -NAME := xorg-x11-server -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) - -ifeq ($(MAKECMDGOALS),me a sandwich) -.PHONY :: me a sandwich -me a: - @: - -sandwich: - @[ `id -u` -ne 0 ] && echo "What? Make it yourself." || echo Okay. -endif diff --git a/commitid b/commitid deleted file mode 100644 index 7420e41..0000000 --- a/commitid +++ /dev/null @@ -1 +0,0 @@ -d13cb974426f7f1110b0bdb08c4ebb46ff8975f7 diff --git a/gitignore b/gitignore deleted file mode 100644 index 524cfc6..0000000 --- a/gitignore +++ /dev/null @@ -1,306 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -.msg -*.lo -*.la -*.a -*.o -*~ -.*sw? -*.pbxuser -*.mode1v3 -obj* -build* -local -aclocal.m4 -autom4te.cache -compile -config.guess -config.log -config.status -config.sub -configure -configure.lineno -depcomp -install-sh -libtool -ltmain.sh -missing -TAGS -tags -ylwrap -xorg-server.pc -stamp-h? -do-not-use-config.h -do-not-use-config.h.in -afb/afbbltC.c -afb/afbbltCI.c -afb/afbbltG.c -afb/afbbltO.c -afb/afbbltX.c -afb/afbseg.c -afb/afbtileC.c -afb/afbtileG.c -cfb/cfb8lineCO.c -cfb/cfb8lineCP.c -cfb/cfb8lineG.c -cfb/cfb8lineX.c -cfb/cfb8segC.c -cfb/cfb8segCS.c -cfb/cfb8segX.c -cfb/cfb8setG.c -cfb/cfbbltC.c -cfb/cfbbltG.c -cfb/cfbbltO.c -cfb/cfbbltX.c -cfb/cfbfillarcC.c -cfb/cfbfillarcG.c -cfb/cfbglrop8.c -cfb/cfbply1rctC.c -cfb/cfbply1rctG.c -cfb/cfbseg.c -cfb/cfbsolidC.c -cfb/cfbsolidG.c -cfb/cfbsolidX.c -cfb/cfbtile32C.c -cfb/cfbtile32G.c -cfb/cfbtileoddC.c -cfb/cfbtileoddG.c -cfb/cfbzerarcC.c -cfb/cfbzerarcG.c -cfb/cfbzerarcX.c -cfb32/cfb8lineCO.c -cfb32/cfb8lineCP.c -cfb32/cfb8lineG.c -cfb32/cfb8lineX.c -cfb32/cfb8segC.c -cfb32/cfb8segCS.c -cfb32/cfb8segX.c -cfb32/cfb8setG.c -cfb32/cfbbltC.c -cfb32/cfbbltG.c -cfb32/cfbbltO.c -cfb32/cfbbltX.c -cfb32/cfbfillarcC.c -cfb32/cfbfillarcG.c -cfb32/cfbply1rctC.c -cfb32/cfbply1rctG.c -cfb32/cfbseg.c -cfb32/cfbsolidC.c -cfb32/cfbsolidG.c -cfb32/cfbsolidX.c -cfb32/cfbtile32C.c -cfb32/cfbtile32G.c -cfb32/cfbtileoddC.c -cfb32/cfbtileoddG.c -cfb32/cfbzerarcC.c -cfb32/cfbzerarcG.c -cfb32/cfbzerarcX.c -doc/Xserver.1x -doc/Xserver.man -hw/dmx/Xdmx -hw/dmx/Xdmx.1x -hw/dmx/config/dmxtodmx -hw/dmx/config/dmxtodmx.1x -hw/dmx/config/parser.c -hw/dmx/config/parser.h -hw/dmx/config/scanner.c -hw/dmx/config/vdltodmx -hw/dmx/config/vdltodmx.1x -hw/dmx/config/xdmxconfig -hw/dmx/config/xdmxconfig.1x -hw/dmx/examples/dmxaddinput -hw/dmx/examples/dmxaddscreen -hw/dmx/examples/dmxreconfig -hw/dmx/examples/dmxresize -hw/dmx/examples/dmxrminput -hw/dmx/examples/dmxrmscreen -hw/dmx/examples/dmxwininfo -hw/dmx/examples/ev -hw/dmx/examples/evi -hw/dmx/examples/res -hw/dmx/examples/xbell -hw/dmx/examples/xdmx -hw/dmx/examples/xinput -hw/dmx/examples/xled -hw/dmx/examples/xtest -hw/kdrive/ati/Xati -hw/kdrive/chips/Xchips -hw/kdrive/ephyr/Xephyr -hw/kdrive/epson/Xepson -hw/kdrive/fake/Xfake -hw/kdrive/fbdev/Xfbdev -hw/kdrive/i810/Xi810 -hw/kdrive/mach64/Xmach64 -hw/kdrive/mga/Xmga -hw/kdrive/neomagic/Xneomagic -hw/kdrive/nvidia/Xnvidia -hw/kdrive/pm2/Xpm2 -hw/kdrive/r128/Xr128 -hw/kdrive/sdl/Xsdl -hw/kdrive/sis300/Xsis -hw/kdrive/smi/Xsmi -hw/kdrive/vesa/Xvesa -hw/kdrive/via/Xvia -hw/vfb/Xvfb -hw/vfb/Xvfb.1x -hw/vfb/Xvfb.man -hw/xfree86/Xorg -hw/xfree86/common/xf86Build.h -hw/xfree86/common/xf86DefModeSet.c -hw/xfree86/doc/man/Xorg.1x -hw/xfree86/doc/man/Xorg.man -hw/xfree86/doc/man/xorg.conf.5x -hw/xfree86/doc/man/xorg.conf.man -hw/xfree86/exa/exa.4 -hw/xfree86/exa/exa.4x -hw/xfree86/exa/exa.man -hw/xfree86/fbdevhw/fbdevhw.4x -hw/xfree86/fbdevhw/fbdevhw.man -hw/xfree86/getconfig/cfg.man -hw/xfree86/getconfig/getconfig.1x -hw/xfree86/getconfig/getconfig.5x -hw/xfree86/getconfig/getconfig.man -hw/xfree86/os-support/xorgos.c -hw/xfree86/osandcommon.c -hw/xfree86/ramdac/xf86BitOrder.c -hw/xfree86/scanpci/xf86PciData.c -hw/xfree86/scanpci/xf86PciIds.h -hw/xfree86/utils/cvt/cvt -hw/xfree86/utils/cvt/cvt.man -hw/xfree86/utils/gtf/gtf -hw/xfree86/utils/gtf/gtf.1x -hw/xfree86/utils/gtf/gtf.man -hw/xfree86/utils/ioport/inb -hw/xfree86/utils/ioport/inl -hw/xfree86/utils/ioport/inw -hw/xfree86/utils/ioport/ioport -hw/xfree86/utils/ioport/outb -hw/xfree86/utils/ioport/outl -hw/xfree86/utils/ioport/outw -hw/xfree86/utils/pcitweak/pcitweak -hw/xfree86/utils/pcitweak/pcitweak.1x -hw/xfree86/utils/pcitweak/pcitweak.man -hw/xfree86/utils/scanpci/scanpci -hw/xfree86/utils/scanpci/scanpci.1x -hw/xfree86/utils/scanpci/scanpci.man -hw/xfree86/utils/xorgcfg/XOrgCfg -hw/xfree86/utils/xorgcfg/xorgcfg -hw/xfree86/utils/xorgcfg/xorgcfg.1x -hw/xfree86/utils/xorgcfg/xorgcfg.man -hw/xfree86/utils/xorgconfig/xorgconfig -hw/xfree86/utils/xorgconfig/xorgconfig.1x -hw/xfree86/utils/xorgconfig/xorgconfig.man -hw/xfree86/xaa/l-xaaBitmap.c -hw/xfree86/xaa/l-xaaStipple.c -hw/xfree86/xaa/l-xaaTEGlyph.c -hw/xfree86/xaa/l3-xaaBitmap.c -hw/xfree86/xaa/l3-xaaStipple.c -hw/xfree86/xaa/lf-xaaBitmap.c -hw/xfree86/xaa/lf-xaaStipple.c -hw/xfree86/xaa/lf-xaaTEGlyph.c -hw/xfree86/xaa/lf3-xaaBitmap.c -hw/xfree86/xaa/lf3-xaaStipple.c -hw/xfree86/xaa/m-xaaBitmap.c -hw/xfree86/xaa/m-xaaStipple.c -hw/xfree86/xaa/m-xaaTEGlyph.c -hw/xfree86/xaa/m3-xaaBitmap.c -hw/xfree86/xaa/m3-xaaStipple.c -hw/xfree86/xaa/mf-xaaBitmap.c -hw/xfree86/xaa/mf-xaaStipple.c -hw/xfree86/xaa/mf-xaaTEGlyph.c -hw/xfree86/xaa/mf3-xaaBitmap.c -hw/xfree86/xaa/mf3-xaaStipple.c -hw/xfree86/xaa/s-xaaDashLine.c -hw/xfree86/xaa/s-xaaLine.c -hw/xfree86/xf1bpp/maskbits.c -hw/xfree86/xf1bpp/mfbbitblt.c -hw/xfree86/xf1bpp/mfbbltC.c -hw/xfree86/xf1bpp/mfbbltCI.c -hw/xfree86/xf1bpp/mfbbltG.c -hw/xfree86/xf1bpp/mfbbltO.c -hw/xfree86/xf1bpp/mfbbltX.c -hw/xfree86/xf1bpp/mfbbres.c -hw/xfree86/xf1bpp/mfbbresd.c -hw/xfree86/xf1bpp/mfbclip.c -hw/xfree86/xf1bpp/mfbcmap.c -hw/xfree86/xf1bpp/mfbfillarc.c -hw/xfree86/xf1bpp/mfbfillrct.c -hw/xfree86/xf1bpp/mfbfillsp.c -hw/xfree86/xf1bpp/mfbfont.c -hw/xfree86/xf1bpp/mfbgc.c -hw/xfree86/xf1bpp/mfbgetsp.c -hw/xfree86/xf1bpp/mfbigbblak.c -hw/xfree86/xf1bpp/mfbigbwht.c -hw/xfree86/xf1bpp/mfbhrzvert.c -hw/xfree86/xf1bpp/mfbimage.c -hw/xfree86/xf1bpp/mfbline.c -hw/xfree86/xf1bpp/mfbmisc.c -hw/xfree86/xf1bpp/mfbpablack.c -hw/xfree86/xf1bpp/mfbpainv.c -hw/xfree86/xf1bpp/mfbpawhite.c -hw/xfree86/xf1bpp/mfbpgbblak.c -hw/xfree86/xf1bpp/mfbpgbinv.c -hw/xfree86/xf1bpp/mfbpgbwht.c -hw/xfree86/xf1bpp/mfbpixmap.c -hw/xfree86/xf1bpp/mfbplyblack.c -hw/xfree86/xf1bpp/mfbplyinv.c -hw/xfree86/xf1bpp/mfbplywhite.c -hw/xfree86/xf1bpp/mfbpntwin.c -hw/xfree86/xf1bpp/mfbpolypnt.c -hw/xfree86/xf1bpp/mfbpushpxl.c -hw/xfree86/xf1bpp/mfbscrclse.c -hw/xfree86/xf1bpp/mfbscrinit.c -hw/xfree86/xf1bpp/mfbseg.c -hw/xfree86/xf1bpp/mfbsetsp.c -hw/xfree86/xf1bpp/mfbteblack.c -hw/xfree86/xf1bpp/mfbtewhite.c -hw/xfree86/xf1bpp/mfbtileC.c -hw/xfree86/xf1bpp/mfbtileG.c -hw/xfree86/xf1bpp/mfbwindow.c -hw/xfree86/xf1bpp/mfbzerarc.c -hw/xfree86/xf4bpp/mfbseg.c -hw/xfree86/xf8_32bpp/cfbgc32.c -hw/xfree86/xf8_32bpp/cfbgc8.c -hw/xfree86/xorg.c -hw/xfree86/xorg.conf.example -hw/xfree86/xorg.conf.example.pre -hw/xnest/Xnest -hw/xnest/Xnest.1x -hw/xnest/Xnest.man -hw/xprint/Xprt -hw/xprint/config/C/print/Xprinters.ghostscript -hw/xprint/doc/Xprt.1x -hw/xprint/doc/Xprt.man -hw/xprint/dpmsstubs-wrapper.c -hw/xprint/miinitext-wrapper.c -include/dix-config.h -include/kdrive-config.h -include/xgl-config.h -include/xkb-config.h -include/xorg-config.h -include/xorg-server.h -include/xwin-config.h -mfb/mfbbltC.c -mfb/mfbbltCI.c -mfb/mfbbltG.c -mfb/mfbbltO.c -mfb/mfbbltX.c -mfb/mfbigbblak.c -mfb/mfbigbwht.c -mfb/mfbpablack.c -mfb/mfbpainv.c -mfb/mfbpawhite.c -mfb/mfbpgbblak.c -mfb/mfbpgbinv.c -mfb/mfbpgbwht.c -mfb/mfbplyblack.c -mfb/mfbplyinv.c -mfb/mfbplywhite.c -mfb/mfbseg.c -mfb/mfbteblack.c -mfb/mfbtewhite.c -mfb/mfbtileC.c -mfb/mfbtileG.c diff --git a/import.log b/import.log deleted file mode 100644 index 782e371..0000000 --- a/import.log +++ /dev/null @@ -1,6 +0,0 @@ -xorg-x11-server-1_5_0-1_fc10:HEAD:xorg-x11-server-1.5.0-1.fc10.src.rpm:1220485219 -xorg-x11-server-1_5_1-1_fc10:HEAD:xorg-x11-server-1.5.1-1.fc10.src.rpm:1222198557 -xorg-x11-server-1_5_2-1_fc10:HEAD:xorg-x11-server-1.5.2-1.fc10.src.rpm:1223667007 -xorg-x11-server-1_5_3-1_fc10:HEAD:xorg-x11-server-1.5.3-1.fc10.src.rpm:1225918317 -xorg-x11-server-1_6_0-1_fc11:HEAD:xorg-x11-server-1.6.0-1.fc11.src.rpm:1235594175 -xorg-x11-server-1_6_1-1_fc11:HEAD:xorg-x11-server-1.6.1-1.fc11.src.rpm:1239742477 diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh deleted file mode 100755 index 0d9b2ad..0000000 --- a/make-git-snapshot.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -DIRNAME=xorg-server-$( date +%Y%m%d ) - -rm -rf $DIRNAME -git clone git://git.freedesktop.org/git/xorg/xserver $DIRNAME -cd $DIRNAME -if [ -z "$1" ]; then - git log | head -1 -else - git checkout $1 -fi -git log | head -1 | awk '{ print $2 }' > ../commitid -git repack -a -d -cd .. -tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz -rm -rf $DIRNAME diff --git a/sources b/sources index 1192868..888c6f9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xorg-server-1.19.5.tar.bz2) = 928dea5850b98cd815004cfa133eca23cfa9521920c934c68a92787f2cae13cca1534eee772a4fb74b8ae8cb92662b5d68b95b834c8aa8ec57cd57cb4e5dd45c +SHA512 (xorg-server-21.1.21.tar.xz) = bb2eb4e6756eb9e38b61bd47c017da44bcf5f45f2b7a906b4bb3a56b3d791cec64abb9bf37b224efe1e4fab9cc296f3672c9b2f8e00e1cdfc54337bef63cd16c diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index a62ad4f..788acf9 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -1,373 +1,230 @@ -# This package is an experiment in active integration of upstream SCM with -# Fedora packaging. It works something like this: -# -# The "pristine" source is actually a git repo (with no working checkout). -# The first step of %%prep is to check it out and switch to a "fedora" branch. -# If you need to add a patch to the server, just do it like a normal git -# operation, dump it with git-format-patch to a file in the standard naming -# format, and add a PatchN: line. If you want to push something upstream, -# check out the master branch, pull, cherry-pick, and push. - # X.org requires lazy relocations to work. %undefine _hardened_build +%undefine _strict_symbol_defs_build -#global gitdate 20161026 -%global stable_abi 1 - -%if !0%{?gitdate} || %{stable_abi} -# Released ABI versions. Have to keep these manually in sync with the -# source because rpm is a terrible language. +# Released ABI versions: %global ansic_major 0 %global ansic_minor 4 -%global videodrv_major 23 -%global videodrv_minor 0 +%global videodrv_major 25 +%global videodrv_minor 2 %global xinput_major 24 -%global xinput_minor 1 +%global xinput_minor 4 %global extension_major 10 %global extension_minor 0 -%endif - -%if 0%{?gitdate} -# For git snapshots, use date for major and a serial number for minor -%global minor_serial 0 -%global git_ansic_major %{gitdate} -%global git_ansic_minor %{minor_serial} -%global git_videodrv_major %{gitdate} -%global git_videodrv_minor %{minor_serial} -%global git_xinput_major %{gitdate} -%global git_xinput_minor %{minor_serial} -%global git_extension_major %{gitdate} -%global git_extension_minor %{minor_serial} -%endif %global pkgname xorg-server -Summary: X.Org X11 X server -Name: xorg-x11-server -Version: 1.19.5 -Release: 1%{?gitdate:.%{gitdate}}%{dist} -URL: http://www.x.org -License: MIT -Group: User Interface/X +Summary: X.Org X11 X server +Name: xorg-x11-server +Version: 21.1.21 +Release: 1%{?dist} +URL: http://www.x.org +# SPDX +License: Adobe-Display-PostScript AND BSD-3-Clause AND DEC-3-Clause AND HPND AND HPND-sell-MIT-disclaimer-xserver AND HPND-sell-variant AND ICU AND ISC AND MIT AND MIT-open-group AND NTP AND SGI-B-2.0 AND SMLNJ AND X11 AND X11-distribute-modifications-variant -#VCS: git:git://git.freedesktop.org/git/xorg/xserver -%if 0%{?gitdate} -# git snapshot. to recreate, run: -# ./make-git-snapshot.sh `cat commitid` -Source0: xorg-server-%{gitdate}.tar.xz -#Source0: http://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.bz2 -Source1: make-git-snapshot.sh -Source2: commitid -%else -Source0: https://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.bz2 -Source1: gitignore -%endif - -Source4: 10-quirks.conf +Source0: https://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.xz Source10: xserver.pamd - # "useful" xvfb-run script -Source20: http://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.sh - +Source20: http://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.sh # for requires generation in drivers -Source30: xserver-sdk-abi-requires.release -Source31: xserver-sdk-abi-requires.git - +Source30: xserver-sdk-abi-requires # maintainer convenience script -Source40: driver-abi-rebuild.sh - -# Various fixes pending upstream -Patch2: 0005-xfree86-Remove-redundant-ServerIsNotSeat0-check-from.patch -Patch3: 0006-xfree86-Make-adding-unclaimed-devices-as-GPU-devices.patch -Patch4: 0007-xfree86-Try-harder-to-find-atleast-1-non-GPU-Screen.patch - -# Patches for better integration with the nvidia driver, pending upstream -Patch11: 0001-xfree86-Free-devlist-returned-by-xf86MatchDevice.patch -Patch12: 0002-xfree86-Make-OutputClassMatches-take-a-xf86_platform.patch -Patch13: 0003-xfree86-Add-options-support-for-OutputClass-Options.patch -Patch14: 0004-xfree86-xf86platformProbe-split-finding-pci-info-and.patch -Patch15: 0005-xfree86-Allow-overriding-primary-GPU-detection-from-.patch -Patch16: 0006-xfree86-Add-ModulePath-support-for-OutputClass-confi.patch - -# Backport tablet support for Xwayland - *NOT* in server-1.19-branch -Patch9901: 0001-xwayland-Depend-on-wayland-protocols-to-build-tablet.patch -Patch9902: 0002-xwayland-Bind-to-wp_tablet_manager-if-available-and-.patch -Patch9903: 0003-xwayland-Listen-for-wp_tablet_seat-events.patch -Patch9904: 0004-xwayland-Handle-wp_tablet-events.patch -Patch9905: 0005-xwayland-Handle-tablet_tool-events.patch -Patch9906: 0006-xwayland-handle-button-events-after-motion-events.patch -Patch9907: 0007-xwayland-Refactor-cursor-management-into-xwl_cursor.patch -Patch9908: 0008-xwayland-update-cursor-on-tablet-tools-in-proximity.patch -Patch9909: 0009-xwayland-add-tablet-pad-support.patch -Patch9910: 0010-xwayland-Unconditionally-initialize-lists-in-init_ta.patch -Patch9911: 0011-xwayland-Correct-off-by-one-error-in-tablet-button-n.patch -Patch9912: 0012-xwayland-Implement-tablet_tool_wheel-for-scrolling.patch +Source40: driver-abi-rebuild.sh # From Debian use intel ddx driver only for gen4 and older chipsets -%if 0%{?fedora} > 25 || 0%{?rhel} > 7 -Patch20: 06_use-intel-only-on-pre-gen4.diff -%endif - -# Submitted upstream -Patch21: 0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch - -#Patch6044: xserver-1.6.99-hush-prerelease-warning.patch - -Patch7025: 0001-Always-install-vbe-and-int10-sdk-headers.patch - -# Submitted upstream, but not going anywhere -Patch7027: xserver-autobind-hotplug.patch - -# because the display-managers are not ready yet, do not upstream -Patch10000: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch - +Patch0: 06_use-intel-only-on-pre-gen4.diff # Default to xf86-video-modesetting on GeForce 8 and newer -Patch10001: 0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch +Patch1: 0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch +# Default to va_gl on intel i965 as we use the modesetting drv there +# va_gl should probably just be the default everywhere ? +Patch2: 0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch +# because the display-managers are not ready yet, do not upstream +Patch3: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch -%global moduledir %{_libdir}/xorg/modules -%global drimoduledir %{_libdir}/dri -%global sdkdir %{_includedir}/xorg - -#ifarch s390 s390x -#global with_hw_servers 0 -#else -%global with_hw_servers 1 -#endif - -%if %{with_hw_servers} -%global enable_xorg --enable-xorg -%else -%global enable_xorg --disable-xorg -%endif - -%ifnarch %{ix86} x86_64 -%global no_int10 --disable-vbe --disable-int10-module -%endif - -%global kdrive --enable-kdrive --enable-xephyr --disable-xfake --disable-xfbdev -%global xservers --enable-xvfb --enable-xnest %{kdrive} %{enable_xorg} - -BuildRequires: systemtap-sdt-devel -BuildRequires: git -BuildRequires: automake autoconf libtool pkgconfig -BuildRequires: xorg-x11-util-macros >= 1.17 - -BuildRequires: xorg-x11-proto-devel >= 7.7-10 -BuildRequires: xorg-x11-font-utils >= 7.2-11 - -BuildRequires: dbus-devel libepoxy-devel systemd-devel -BuildRequires: xorg-x11-xtrans-devel >= 1.3.2 -BuildRequires: libXfont2-devel libXau-devel libxkbfile-devel libXres-devel -BuildRequires: libfontenc-devel libXtst-devel libXdmcp-devel -BuildRequires: libX11-devel libXext-devel -BuildRequires: libXinerama-devel libXi-devel - -# DMX config utils buildreqs. -BuildRequires: libXt-devel libdmx-devel libXmu-devel libXrender-devel -BuildRequires: libXi-devel libXpm-devel libXaw-devel libXfixes-devel - -BuildRequires: wayland-devel -BuildRequires: wayland-protocols-devel -BuildRequires: pkgconfig(wayland-client) >= 1.3.0 -BuildRequires: pkgconfig(epoxy) -%if 0%{?fedora} > 24 || 0%{?rhel} > 7 -BuildRequires: pkgconfig(xshmfence) >= 1.1 -%endif -BuildRequires: libXv-devel -BuildRequires: pixman-devel >= 0.30.0 -BuildRequires: libpciaccess-devel >= 0.13.1 openssl-devel bison flex flex-devel -BuildRequires: mesa-libGL-devel >= 9.2 -BuildRequires: mesa-libEGL-devel -BuildRequires: mesa-libgbm-devel -# XXX silly... -BuildRequires: libdrm-devel >= 2.4.0 kernel-headers - -BuildRequires: audit-libs-devel libselinux-devel >= 2.0.86-1 -BuildRequires: libudev-devel -%if 0%{?fedora} > 24 || 0%{?rhel} > 7 -# libunwind is Exclusive for the following arches -%ifarch aarch64 %{arm} hppa ia64 mips ppc ppc64 %{ix86} x86_64 -BuildRequires: libunwind-devel -%endif -%endif - -BuildRequires: pkgconfig(xcb-aux) pkgconfig(xcb-image) pkgconfig(xcb-icccm) -BuildRequires: pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil) - -# All server subpackages have a virtual provide for the name of the server -# they deliver. The Xorg one is versioned, the others are intentionally -# unversioned. +BuildRequires: bison +BuildRequires: flex +BuildRequires: gawk +BuildRequires: gcc +BuildRequires: kernel-headers +BuildRequires: libXi-devel +BuildRequires: libXinerama-devel +BuildRequires: libXres-devel +BuildRequires: libXv-devel +BuildRequires: make +BuildRequires: mesa-libEGL-devel +BuildRequires: mesa-libGL-devel >= 9.2 +BuildRequires: meson +BuildRequires: pkgconfig +BuildRequires: pkgconfig(audit) +BuildRequires: pkgconfig(bigreqsproto) >= 1.1.0 +BuildRequires: pkgconfig(compositeproto) >= 0.4 +BuildRequires: pkgconfig(damageproto) >= 1.1 +BuildRequires: pkgconfig(dbus-1) >= 1.0 +BuildRequires: pkgconfig(dri2proto) >= 2.8 +BuildRequires: pkgconfig(dri3proto) >= 1.2 +BuildRequires: pkgconfig(epoxy) +BuildRequires: pkgconfig(epoxy) >= 1.5.4 +BuildRequires: pkgconfig(fixesproto) >= 6.0 +BuildRequires: pkgconfig(fontsproto) >= 2.1.3 +BuildRequires: pkgconfig(gbm) >= 10.2 +BuildRequires: pkgconfig(inputproto) >= 2.3.99.1 +BuildRequires: pkgconfig(kbproto) >= 1.0.3 +BuildRequires: pkgconfig(libdrm) >= 2.4.89 +BuildRequires: pkgconfig(libselinux) >= 2.0.86 +BuildRequires: pkgconfig(libsystemd) >= 209 +BuildRequires: pkgconfig(libudev) >= 143 +BuildRequires: pkgconfig(libunwind) +BuildRequires: pkgconfig(libxcvt) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(pciaccess) >= 0.12.901 +BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(randrproto) >= 1.6.0 +BuildRequires: pkgconfig(recordproto) >= 1.13.99.1 +BuildRequires: pkgconfig(renderproto) >= 0.11 +BuildRequires: pkgconfig(resourceproto) >= 1.2.0 +BuildRequires: pkgconfig(scrnsaverproto) >= 1.1 +BuildRequires: pkgconfig(videoproto) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(x11-xcb) +BuildRequires: pkgconfig(xau) +BuildRequires: pkgconfig(xcb-aux) +BuildRequires: pkgconfig(xcb-icccm) +BuildRequires: pkgconfig(xcb-image) +BuildRequires: pkgconfig(xcb-keysyms) +BuildRequires: pkgconfig(xcb-renderutil) +BuildRequires: pkgconfig(xcmiscproto) >= 1.2.0 +BuildRequires: pkgconfig(xdmcp) +BuildRequires: pkgconfig(xext) >= 1.0.99.4 +BuildRequires: pkgconfig(xextproto) >= 7.2.99.901 +BuildRequires: pkgconfig(xf86bigfontproto) >= 1.2.0 +BuildRequires: pkgconfig(xf86vidmodeproto) >= 2.2.99.1 +BuildRequires: pkgconfig(xfont2) >= 2.0 +BuildRequires: pkgconfig(xineramaproto) +BuildRequires: pkgconfig(xkbfile) +BuildRequires: pkgconfig(xproto) >= 7.0.31 +BuildRequires: pkgconfig(xshmfence) >= 1.1 +BuildRequires: pkgconfig(xtrans) >= 1.3.5 +BuildRequires: pkgconfig(xtrans) >= 1.3.5 +BuildRequires: systemtap-sdt-devel +BuildRequires: xorg-x11-util-macros >= 1.17 +BuildRequires: xorg-x11-xtrans-devel >= 1.3.2 %description -X.Org X11 X server +X.Org X11 X server. -%package common -Summary: Xorg server common files -Group: User Interface/X -Requires: pixman >= 0.30.0 -Requires: xkeyboard-config xkbcomp +%package common +Summary: Xorg server common files +Requires: pixman +Requires: xkbcomp +Requires: xkeyboard-config -%description common +%description common Common files shared among all X servers. -%if %{with_hw_servers} -%package Xorg -Summary: Xorg X server -Group: User Interface/X -Provides: Xorg = %{version}-%{release} -Provides: Xserver +%package Xorg +Summary: Xorg X server +Requires: libEGL +Requires: system-setup-keyboard +Requires: xorg-x11-drv-libinput +Requires: xorg-x11-server-common >= %{version}-%{release} +Provides: Xorg = %{version}-%{release} +Provides: Xserver # HdG: This should be moved to the wrapper package once the wrapper gets # its own sub-package: -Provides: xorg-x11-server-wrapper = %{version}-%{release} -%if !0%{?gitdate} || %{stable_abi} -Provides: xserver-abi(ansic-%{ansic_major}) = %{ansic_minor} -Provides: xserver-abi(videodrv-%{videodrv_major}) = %{videodrv_minor} -Provides: xserver-abi(xinput-%{xinput_major}) = %{xinput_minor} -Provides: xserver-abi(extension-%{extension_major}) = %{extension_minor} -%endif -%if 0%{?gitdate} -Provides: xserver-abi(ansic-%{git_ansic_major}) = %{git_ansic_minor} -Provides: xserver-abi(videodrv-%{git_videodrv_major}) = %{git_videodrv_minor} -Provides: xserver-abi(xinput-%{git_xinput_major}) = %{git_xinput_minor} -Provides: xserver-abi(extension-%{git_extension_major}) = %{git_extension_minor} -%endif -Obsoletes: xorg-x11-glamor < %{version}-%{release} -Provides: xorg-x11-glamor = %{version}-%{release} -Obsoletes: xorg-x11-drv-modesetting < %{version}-%{release} -Provides: xorg-x11-drv-modesetting = %{version}-%{release} -%if 0%{?fedora} > 24 || 0%{?rhel} > 7 -# Dropped from F25 -Obsoletes: xorg-x11-drv-vmmouse < 13.1.0-4 -%endif +Provides: xorg-x11-server-wrapper = %{version}-%{release} +Provides: xserver-abi(ansic-%{ansic_major}) = %{ansic_minor} +Provides: xserver-abi(videodrv-%{videodrv_major}) = %{videodrv_minor} +Provides: xserver-abi(xinput-%{xinput_major}) = %{xinput_minor} +Provides: xserver-abi(extension-%{extension_major}) = %{extension_minor} +# Dropped from xorg-x11-server-21.1 +# https://gitlab.freedesktop.org/xorg/xserver/-/commit/b3b81c8c2090cd49410960a021baf0d27fdd2ab3 +Obsoletes: xorg-x11-server-Xdmx < 1.20.15 +# Legacy fbdev devices have been replaced with simpledrm: +# https://fedoraproject.org/wiki/Changes/ReplaceFbdevDrivers +Obsoletes: xorg-x11-drv-fbdev < 0.5.0-19 +Obsoletes: xorg-x11-drv-vesa < 2.6.0-3 +Obsoletes: xorg-x11-drv-armsoc < 1.4.1-10 -Requires: xorg-x11-server-common >= %{version}-%{release} -Requires: system-setup-keyboard - -%description Xorg -X.org X11 is an open source implementation of the X Window System. It -provides the basic low level functionality which full fledged -graphical user interfaces (GUIs) such as GNOME and KDE are designed -upon. -%endif +%description Xorg +X.org X11 is an open source implementation of the X Window System. It provides +the basic low level functionality which full fledged graphical user interfaces +(GUIs) such as GNOME and KDE are designed upon. -%package Xnest -Summary: A nested server -Group: User Interface/X -Requires: xorg-x11-server-common >= %{version}-%{release} -Provides: Xnest +%package Xnest +Summary: A nested server +Requires: xorg-x11-server-common >= %{version}-%{release} +Provides: Xnest -%description Xnest -Xnest is an X server which has been implemented as an ordinary -X application. It runs in a window just like other X applications, -but it is an X server itself in which you can run other software. It -is a very useful tool for developers who wish to test their -applications without running them on their real X server. +%description Xnest +Xnest is an X server which has been implemented as an ordinary X application. It +runs in a window just like other X applications, but it is an X server itself in +which you can run other software. It is a very useful tool for developers who +wish to test their applications without running them on their real X server. -%package Xdmx -Summary: Distributed Multihead X Server and utilities -Group: User Interface/X -Requires: xorg-x11-server-common >= %{version}-%{release} -Provides: Xdmx - -%description Xdmx -Xdmx is proxy X server that provides multi-head support for multiple displays -attached to different machines (each of which is running a typical X server). -When Xinerama is used with Xdmx, the multiple displays on multiple machines -are presented to the user as a single unified screen. A simple application -for Xdmx would be to provide multi-head support using two desktop machines, -each of which has a single display device attached to it. A complex -application for Xdmx would be to unify a 4 by 4 grid of 1280x1024 displays -(each attached to one of 16 computers) into a unified 5120x4096 display. - - -%package Xvfb -Summary: A X Windows System virtual framebuffer X server -Group: User Interface/X +%package Xvfb +Summary: A X Windows System virtual framebuffer X server # xvfb-run is GPLv2, rest is MIT -License: MIT and GPLv2 -Requires: xorg-x11-server-common >= %{version}-%{release} +License: MIT and GPL-2.0-only +Requires: xorg-x11-server-common >= %{version}-%{release} # required for xvfb-run -Requires: xorg-x11-xauth -Provides: Xvfb +Requires: xorg-x11-xauth +Provides: Xvfb +Requires: util-linux -%description Xvfb -Xvfb (X Virtual Frame Buffer) is an X server that is able to run on -machines with no display hardware and no physical input devices. -Xvfb simulates a dumb framebuffer using virtual memory. Xvfb does -not open any devices, but behaves otherwise as an X display. Xvfb -is normally used for testing servers. +%description Xvfb +Xvfb (X Virtual Frame Buffer) is an X server that is able to run on machines +with no display hardware and no physical input devices. Xvfb simulates a dumb +framebuffer using virtual memory. Xvfb does not open any devices, but behaves +otherwise as an X display. Xvfb is normally used for testing servers. -%package Xephyr -Summary: A nested server -Group: User Interface/X -Requires: xorg-x11-server-common >= %{version}-%{release} -Provides: Xephyr +%package Xephyr +Summary: A nested server +Requires: xorg-x11-server-common >= %{version}-%{release} +Provides: Xephyr -%description Xephyr -Xephyr is an X server which has been implemented as an ordinary -X application. It runs in a window just like other X applications, -but it is an X server itself in which you can run other software. It -is a very useful tool for developers who wish to test their -applications without running them on their real X server. Unlike -Xnest, Xephyr renders to an X image rather than relaying the -X protocol, and therefore supports the newer X extensions like -Render and Composite. +%description Xephyr +Xephyr is an X server which has been implemented as an ordinary X application. +It runs in a window just like other X applications, but it is an X server itself +in which you can run other software. It is a very useful tool for developers who +wish to test their applications without running them on their real X server. +Unlike Xnest, Xephyr renders to an X image rather than relaying the X protocol, +and therefore supports the newer X extensions like Render and Composite. -%package Xwayland -Summary: Wayland X Server -Group: User Interface/X -Requires: xorg-x11-server-common >= %{version}-%{release} - -%description Xwayland -Xwayland is an X server for running X clients under Wayland. - - -%if %{with_hw_servers} -%package devel -Summary: SDK for X server driver module development -Group: User Interface/X -Requires: xorg-x11-util-macros -Requires: xorg-x11-proto-devel -Requires: libXfont2-devel -Requires: pkgconfig pixman-devel libpciaccess-devel -Provides: xorg-x11-server-static -Obsoletes: xorg-x11-glamor-devel < %{version}-%{release} -Provides: xorg-x11-glamor-devel = %{version}-%{release} +%package devel +Summary: SDK for X server driver module development +Requires: libpciaccess-devel +Requires: libXfont2-devel +Requires: xorg-x11-proto-devel +Requires: xorg-x11-util-macros +Requires: pixman-devel +Requires: pkgconfig +Provides: xorg-x11-server-static %description devel The SDK package provides the developmental files which are necessary for -developing X server driver modules, and for compiling driver modules -outside of the standard X11 source code tree. Developers writing video -drivers, input drivers, or other X modules should install this package. -%endif +developing X server driver modules, and for compiling driver modules outside of +the standard X11 source code tree. Developers writing video drivers, input +drivers, or other X modules should install this package. -%package source -Summary: Xserver source code required to build VNC server (Xvnc) -Group: Development/Libraries -BuildArch: noarch +%package source +Summary: Xserver source code required to build VNC server (Xvnc) +BuildArch: noarch -%description source -Xserver source code needed to build VNC server (Xvnc) +%description source +Xserver source code needed to build VNC server (Xvnc). %prep -%autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} -rm -rf .git -cp %{SOURCE1} .gitignore -# ick -%global __scm git -%{expand:%__scm_setup_git -q} -%autopatch +%autosetup -p1 -n %{pkgname}-%{version} -%if %{with_hw_servers} && 0%{?stable_abi} # check the ABI in the source against what we expect. getmajor() { grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h | @@ -388,125 +245,102 @@ test `getminor xinput` == %{xinput_minor} test `getmajor extension` == %{extension_major} test `getminor extension` == %{extension_minor} -%endif - %build +%meson \ + -D agp=auto \ + -D builder_string="Build ID: %{name} %{version}-%{release}" \ + -D default_font_path="catalogue:/etc/X11/fontpath.d,built-ins" \ + -D devel-docs=false \ + -D dga=true \ + -D docs-pdf=false \ + -D docs=false \ + -D dpms=true \ + -D dri1=false \ + -D dri2=true \ + -D dri3=true \ + -D drm=true \ + -D dtrace=false \ + -D fallback_input_driver=libinput \ + -D glamor=true \ + -D glx=true \ + -D hal=false \ + -D input_thread=true \ + -D int10=false \ + -D ipv6=true \ + -D libunwind=true \ + -D linux_acpi=false \ + -D linux_apm=false \ + -D listen_local=true \ + -D listen_tcp=false \ + -D listen_unix=true \ + -D log_dir="%{_localstatedir}/log" \ + -D mitshm=auto \ + -D module_dir="%{_libdir}/xorg/modules" \ + -D pciaccess=true \ + -D screensaver=true \ + -D secure-rpc=false \ + -D sha1=libcrypto \ + -D suid_wrapper=true \ + -D systemd_logind=true \ + -D udev_kms=true \ + -D udev=true \ + -D vgahw=true \ + -D xace=true \ + -D xcsecurity=true \ + -D xdm-auth-1=true \ + -D xdmcp=true \ + -D xephyr=true \ + -D xf86bigfont=false \ + -D xf86-input-inputtest=true \ + -D xinerama=true \ + -D xkb_output_dir="%{_localstatedir}/lib/xkb" \ + -D xnest=true \ + -D xorg=true \ + -D xpbproxy=false \ + -D xquartz=false \ + -D xres=true \ + -D xselinux=true \ + -D xvfb=true \ + -D xvmc=true \ + -D xv=true \ + -D xwin=false -%global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins" - -%if %{with_hw_servers} -%global dri_flags --enable-dri --enable-dri2 %{?!rhel:--enable-dri3} --enable-suid-wrapper --enable-glamor -%else -%global dri_flags --disable-dri --disable-dri2 -%endif - -%if 0%{?fedora} > 24 || 0%{?rhel} > 7 -%global bodhi_flags --with-vendor-name="Fedora Project" -%global wayland --enable-xwayland -%endif - -# ick -%if 0%{?fedora} < 20 || 0%{?rhel} <= 7 -sed -i 's/WAYLAND_SCANNER_RULES.*//g' configure.ac -%endif - -# --with-pie ? -autoreconf -f -v --install || exit 1 -# export CFLAGS="${RPM_OPT_FLAGS}" -# XXX without dtrace - -%configure %{xservers} \ - --enable-dependency-tracking \ - --disable-static \ - --with-pic \ - %{?no_int10} --with-int10=x86emu \ - --with-default-font-path=%{default_font_path} \ - --with-module-dir=%{moduledir} \ - --with-builderstring="Build ID: %{name} %{version}-%{release}" \ - --with-os-name="$(hostname -s) $(uname -r)" \ - --with-xkb-output=%{_localstatedir}/lib/xkb \ - --without-dtrace \ - --disable-linux-acpi --disable-linux-apm \ - --enable-xselinux --enable-record --enable-present \ - --enable-config-udev \ - --disable-unit-tests \ - --enable-dmx \ - %{?wayland} \ - %{dri_flags} %{?bodhi_flags} \ - ${CONFIGURE} - -make V=1 %{?_smp_mflags} - +%meson_build %install -%make_install moduledir=%{moduledir} +%meson_install -%if %{with_hw_servers} -rm -rf $RPM_BUILD_ROOT%{_libdir}/xorg/modules/multimedia/ -mkdir -p $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} - -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d -install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/xserver - -mkdir -p $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d -install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d +install -D -m 0644 -p xkb/README.compiled %{buildroot}%{_localstatedir}/lib/xkb/README.compiled +install -D -m 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/xserver # make sure the (empty) /etc/X11/xorg.conf.d is there, system-setup-keyboard # relies on it more or less. -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d -mkdir -p $RPM_BUILD_ROOT%{_bindir} - -%if %{stable_abi} -install -m 755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires -%else -sed -e s/@MAJOR@/%{gitdate}/g -e s/@MINOR@/%{minor_serial}/g %{SOURCE31} > \ - $RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires -chmod 755 $RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires -%endif - -%endif +install -D -m 0755 %{SOURCE30} %{buildroot}%{_bindir}/xserver-sdk-abi-requires +install -D -m 0755 %{SOURCE20} %{buildroot}%{_bindir}/xvfb-run # Make the source package %global xserver_source_dir %{_datadir}/xorg-x11-server-source %global inst_srcdir %{buildroot}/%{xserver_source_dir} + mkdir -p %{inst_srcdir}/{Xext,xkb,GL,hw/{xquartz/bundle,xfree86/common}} mkdir -p %{inst_srcdir}/{hw/dmx/doc,man,doc,hw/dmx/doxygen} cp {,%{inst_srcdir}/}hw/xquartz/bundle/cpprules.in cp {,%{inst_srcdir}/}man/Xserver.man cp {,%{inst_srcdir}/}doc/smartsched -cp {,%{inst_srcdir}/}hw/dmx/doxygen/doxygen.conf.in +#cp {,%{inst_srcdir}/}hw/dmx/doxygen/doxygen.conf.in cp {,%{inst_srcdir}/}xserver.ent.in cp {,%{inst_srcdir}/}hw/xfree86/Xorg.sh.in cp xkb/README.compiled %{inst_srcdir}/xkb cp hw/xfree86/xorgconf.cpp %{inst_srcdir}/hw/xfree86 -install -m 0755 %{SOURCE20} $RPM_BUILD_ROOT%{_bindir}/xvfb-run - -find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | +find . -type f -not -path "./%{_vpath_builddir}/*" | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | xargs tar cf - | (cd %{inst_srcdir} && tar xf -) -# SLEDGEHAMMER find %{inst_srcdir}/hw/xfree86 -name \*.c -delete # Remove unwanted files/dirs -{ - rm -f $RPM_BUILD_ROOT%{_libdir}/X11/Options - rm -f $RPM_BUILD_ROOT%{_bindir}/in? - rm -f $RPM_BUILD_ROOT%{_bindir}/ioport - rm -f $RPM_BUILD_ROOT%{_bindir}/out? - rm -f $RPM_BUILD_ROOT%{_bindir}/pcitweak - rm -f $RPM_BUILD_ROOT%{_mandir}/man1/pcitweak.1* - find $RPM_BUILD_ROOT -type f -name '*.la' | xargs rm -f -- || : -%if !%{with_hw_servers} - rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/xorg-server.pc - rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/xorg-server.m4 - rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/xorg-server -%endif -# wtf -%ifnarch %{ix86} x86_64 - rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/lib{int10,vbe}.so -%endif -} +find %{buildroot} -type f -name '*.la' -delete %files common @@ -516,22 +350,15 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %dir %{_localstatedir}/lib/xkb %{_localstatedir}/lib/xkb/README.compiled -%if 1 -%global Xorgperms %attr(4755, root, root) -%else -# disable until module loading is audited -%global Xorgperms %attr(0711,root,root) %caps(cap_sys_admin,cap_sys_rawio,cap_dac_override=pe) -%endif - -%if %{with_hw_servers} %files Xorg %config %attr(0644,root,root) %{_sysconfdir}/pam.d/xserver +%{_bindir}/gtf %{_bindir}/X %{_bindir}/Xorg %{_libexecdir}/Xorg -%{Xorgperms} %{_libexecdir}/Xorg.wrap -%{_bindir}/cvt -%{_bindir}/gtf +# Disable until module loading is audited +# %attr(0711,root,root) %caps(cap_sys_admin,cap_sys_rawio,cap_dac_override=pe) +%attr(4755, root, root) %{_libexecdir}/Xorg.wrap %dir %{_libdir}/xorg %dir %{_libdir}/xorg/modules %dir %{_libdir}/xorg/modules/drivers @@ -539,56 +366,33 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %dir %{_libdir}/xorg/modules/extensions %{_libdir}/xorg/modules/extensions/libglx.so %dir %{_libdir}/xorg/modules/input -%{_libdir}/xorg/modules/libfbdevhw.so +%{_libdir}/xorg/modules/input/inputtest_drv.so %{_libdir}/xorg/modules/libexa.so -%{_libdir}/xorg/modules/libfb.so +%{_libdir}/xorg/modules/libfbdevhw.so +#%%{_libdir}/xorg/modules/libfb.so %{_libdir}/xorg/modules/libglamoregl.so %{_libdir}/xorg/modules/libshadow.so %{_libdir}/xorg/modules/libshadowfb.so %{_libdir}/xorg/modules/libvgahw.so %{_libdir}/xorg/modules/libwfb.so -%ifarch %{ix86} x86_64 -%{_libdir}/xorg/modules/libint10.so -%{_libdir}/xorg/modules/libvbe.so -%endif %{_mandir}/man1/gtf.1* %{_mandir}/man1/Xorg.1* %{_mandir}/man1/Xorg.wrap.1* -%{_mandir}/man1/cvt.1* -%{_mandir}/man4/fbdevhw.4* %{_mandir}/man4/exa.4* +%{_mandir}/man4/fbdevhw.4* +%{_mandir}/man4/inputtestdrv.4* %{_mandir}/man4/modesetting.4* -%{_mandir}/man5/Xwrapper.config.5* %{_mandir}/man5/xorg.conf.5* %{_mandir}/man5/xorg.conf.d.5* +%{_mandir}/man5/Xwrapper.config.5* %dir %{_sysconfdir}/X11/xorg.conf.d %dir %{_datadir}/X11/xorg.conf.d %{_datadir}/X11/xorg.conf.d/10-quirks.conf -%endif - %files Xnest %{_bindir}/Xnest %{_mandir}/man1/Xnest.1* -%files Xdmx -%{_bindir}/Xdmx -%{_bindir}/dmxaddinput -%{_bindir}/dmxaddscreen -%{_bindir}/dmxreconfig -%{_bindir}/dmxresize -%{_bindir}/dmxrminput -%{_bindir}/dmxrmscreen -%{_bindir}/dmxtodmx -%{_bindir}/dmxwininfo -%{_bindir}/vdltodmx -%{_bindir}/dmxinfo -%{_bindir}/xdmxconfig -%{_mandir}/man1/Xdmx.1* -%{_mandir}/man1/dmxtodmx.1* -%{_mandir}/man1/vdltodmx.1* -%{_mandir}/man1/xdmxconfig.1* - %files Xvfb %{_bindir}/Xvfb %{_bindir}/xvfb-run @@ -598,510 +402,211 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %{_bindir}/Xephyr %{_mandir}/man1/Xephyr.1* -%files Xwayland -%{_bindir}/Xwayland - -%if %{with_hw_servers} %files devel %doc COPYING -#{_docdir}/xorg-server %{_bindir}/xserver-sdk-abi-requires %{_libdir}/pkgconfig/xorg-server.pc %dir %{_includedir}/xorg -%{sdkdir}/*.h +%{_includedir}/xorg/*.h %{_datadir}/aclocal/xorg-server.m4 -%endif %files source %{xserver_source_dir} %changelog -* Thu Oct 12 2017 Adam Jackson - 1.19.5-1 -- xserver 1.19.5 +* Tue Nov 25 2025 Olivier Fourdan - 21.1.21-1 +- Update to xserver 21.1.21 (#2417000) -* Thu Oct 05 2017 Olivier Fourdan - 1.19.4-1 -- xserver-1.19.4 -- Backport tablet support for Xwayland +* Tue Oct 28 2025 Olivier Fourdan - 21.1.20-1 +- Update to xserver 21.1.20 (#2406803) +- CVE fix for: CVE-2025-62229, CVE-2025-62230, CVE-2025-62231 -* Fri Sep 08 2017 Troy Dawson - 1.19.3-9 -- Cleanup spec file conditionals +* Fri Jul 25 2025 Fedora Release Engineering - 21.1.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild -* Thu Aug 03 2017 Fedora Release Engineering - 1.19.3-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild +* Wed Jul 09 2025 Peter Hutterer +- Update Xvfb SPDX license identifier -* Thu Jul 27 2017 Fedora Release Engineering - 1.19.3-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild +* Wed Jun 18 2025 Olivier Fourdan - 21.1.18-1 +- Update to xserver 21.1.18 +- Contains an additional fix for CVE-2025-49176 -* Sun Jul 2 2017 Ville Skyttä - 1.19.3-6 -- Use type instead of which in xvfb-run (rhbz#1443357) +* Tue Jun 17 2025 Olivier Fourdan - 21.1.17-1 +- Update to xserver 21.1.17 +- CVE fix for: CVE-2025-49175, CVE-2025-49176, CVE-2025-49177 + CVE-2025-49178, CVE-2025-49179, CVE-2025-49180 -* Thu May 04 2017 Orion Poplawski - 1.19.3-5 -- Enable full build for s390/x +* Wed Feb 26 2025 Olivier Fourdan - 21.1.16-1 +- Update to xserver 21.1.16 (#2347558) +- CVE fix for: CVE-2025-26594, CVE-2025-26595, CVE-2025-26596, CVE-2025-26597, + CVE-2025-26598, CVE-2025-26599, CVE-2025-26600, CVE-2025-26601 -* Mon Apr 24 2017 Ben Skeggs - 1.19.3-4 -- Default to xf86-video-modesetting on GeForce 8 and newer +* Tue Feb 25 2025 Olivier Fourdan - 21.1.15-3 +- Fix DRI2 failure (#2347345) -* Fri Apr 07 2017 Adam Jackson - 1.19.3-3 -- Inoculate against a versioning bug with libdrm 2.4.78 +* Sun Jan 19 2025 Fedora Release Engineering - 21.1.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild -* Thu Mar 23 2017 Hans de Goede - 1.19.3-2 -- Use va_gl as vdpau driver on i965 GPUs (rhbz#1413733) +* Fri Dec 20 2024 José Expósito - 21.1.15-1 +- Update to v21.1.15 -* Wed Mar 15 2017 Adam Jackson - 1.19.3-1 -- xserver 1.19.3 +* Fri Nov 29 2024 Sérgio Basto - 21.1.14-3 +- Revert commit "Fix error copying Xorg.wrap", debugedit-5.1-2 have the real fix -* Thu Mar 02 2017 Adam Jackson - 1.19.2-1 -- xserver 1.19.2 +* Mon Nov 18 2024 José Expósito - 21.1.14-2 +- Fix build issues caused by Xorg.wrap +- Restore quirks for Apple silicon + Fixes: 422064e45a42 ("Update X11-server to 21.1.13 and ABI numbers of videodrv and xinput") + Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2326701 -* Sat Feb 11 2017 Fedora Release Engineering - 1.19.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild +* Tue Oct 29 2024 José Expósito - 21.1.14-1 +- Update to v21.1.14 -* Wed Feb 01 2017 Peter Hutterer 1.19.1-3 -- Fix a few input thread lock issues causing intel crashes (#1384486) +* Wed Oct 16 2024 Peter Robinson +- Obsolete xorg-x11-drv-armsoc -* Mon Jan 16 2017 Adam Jackson - 1.19.1-2 -- Limit the intel driver only on F26 and up +* Mon Sep 30 2024 Simone Caronni - 21.1.13-5 +- After removal of int10/vbe, obsolete vesa and fbdev X drivers: + https://fedoraproject.org/wiki/Changes/ReplaceFbdevDrivers -* Wed Jan 11 2017 Adam Jackson - 1.19.1-1 -- xserver 1.19.1 +* Sat Sep 28 2024 Simone Caronni - 21.1.13-4 +- Remove all conditionals. Drop int10 everywhere and enable libunwind/dri3 on + ELN. -* Tue Jan 10 2017 Hans de Goede - 1.19.0-4 -- Follow Debian and only default to the intel ddx on gen4 or older intel GPUs +* Fri Sep 27 2024 Simone Caronni - 21.1.13-3 +- Switch to meson, drop no longer required patch. +- Drop Obsoletes/Provides that have been removed in ~2014. +- Add build depdendencies as they are searched by meson. +- Format SPEC file. -* Tue Dec 20 2016 Hans de Goede - 1.19.0-3 -- Add one more patch for better integration with the nvidia binary driver +* Thu Sep 26 2024 Simone Caronni - 21.1.13-2 +- Drop support for building snapshots. If they need to be built, there are + anyway more simpler ways. +- Trim changelog. +- Drop custom compileri/linker flags that are part of the standard already. -* Thu Dec 15 2016 Hans de Goede - 1.19.0-2 -- Add some patches for better integration with the nvidia binary driver -- Add a patch from upstream fixing a crash (rhbz#1389886) +* Mon Sep 02 2024 Sérgio Basto - 21.1.13-1 +- Update X11-server to 21.1.13 and ABI numbers of videodrv and xinput +- DMX DDX was dropped +- 0001-Disallow-byte-swapped-clients-by-default.patch is upstreamed +- 0001-autobind-GPUs-to-the-screen.patch is upstreamed +- 0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch updated -* Wed Nov 23 2016 Olivier Fourdan 1.19.0-1 -- xserver 1.19.0 -- Fix use after free of cursors in Xwayland (rhbz#1385258) -- Fix an issue where some monitors would show only black, or - partially black when secondary GPU outputs are used +* Sat Jul 20 2024 Fedora Release Engineering - 1.20.14-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild -* Tue Nov 15 2016 Peter Hutterer 1.19.0-0.8.rc2 -- Update device barriers for new master devices (#1384432) +* Wed Apr 10 2024 José Expósito - 1.20.14-35 +- Backport fix for invalid Unicode sequence -* Thu Nov 3 2016 Hans de Goede - 1.19.0-0.7.rc2 -- Update to 1.19.0-rc2 -- Fix (hopefully) various crashes in FlushAllOutput() (rhbz#1382444) -- Fix Xwayland crashing in glamor on non glamor capable hw (rhbz#1390018) +* Wed Apr 10 2024 José Expósito - 1.20.14-35 +- Fix regression caused by the fix for CVE-2024-31083 -* Tue Nov 1 2016 Ben Crocker - 1.19.0-0.6.20161028 -- Fix Config record allocation during startup: if xorg.conf.d directory -- was absent, a segfault resulted. +* Wed Apr 03 2024 José Expósito - 1.20.14-34 +- CVE fix for: CVE-2024-31080, CVE-2024-31081, CVE-2024-31082 and + CVE-2024-31083 -* Mon Oct 31 2016 Adam Jackson - 1.19.0-0.5.20161026 -- Use %%autopatch instead of doing our own custom git-am trick +* Mon Mar 04 2024 José Expósito - 1.20.14-33 +- Add util-linux as a dependency of Xvfb -* Fri Oct 28 2016 Hans de Goede - 1.19.0-0.4.20161026 -- Add missing Requires: libXfont2-devel to -devel sub-package (rhbz#1389711) +* Sat Jan 27 2024 Fedora Release Engineering - 1.20.14-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Wed Oct 26 2016 Hans de Goede - 1.19.0-0.3.20161026 -- Sync with upstream git, bringing in a bunch if bug-fixes -- Add some extra fixes which are pending upstream -- This also adds PointerWarping emulation to Xwayland, which should improve - compatiblity with many games +* Fri Jan 19 2024 José Expósito - 1.20.14-31 +- Fix compilation error on i686 -* Wed Oct 5 2016 Hans de Goede - 1.19.0-0.2.20160929 -- Add a fix from upstream to fix xterm crash under Xwayland (fdo#97974) -- Add a fix from upstream to fix glamor / xwayland not working with glvnd -- Add a fix from upstream to fix input devices no longer working - after a vt-switch +* Fri Jan 19 2024 José Expósito - 1.20.14-30 +- Fix use after free related to CVE-2024-21886 -* Thu Sep 29 2016 Hans de Goede - 1.19.0-0.1.20160929 -- Rebase to current git master (1.19-rc1+) -- Drop Obsoletes for the driver packages removed from F21 (its been 2 - years since they have been removed now) +* Tue Jan 16 2024 José Expósito - 1.20.14-29 +- CVE fix for: CVE-2023-6816, CVE-2024-0229, CVE-2024-21885, CVE-2024-21886, + CVE-2024-0408 and CVE-2024-0409 -* Thu Sep 08 2016 Adam Jackson 1.18.4-6 -- Backport GLX_EXT_libglvnd support from 1.19 +* Wed Dec 13 2023 Peter Hutterer - 1.20.14-28 +- CVE fix for: CVE-2023-6377, CVE-2023-6478 -* Thu Sep 01 2016 Peter Hutterer 1.18.4-5 -- Fall back to libinput if the module is missing +* Fri Nov 10 2023 Peter Hutterer - 1.20.14-27 +- Update with full SPDX license list -* Thu Aug 25 2016 Hans de Goede - 1.18.4-4 -- Fix (undo) server ABI breakage from 1.18.4-3 +* Wed Oct 25 2023 Peter Hutterer - 1.20.14-26 +- CVE fix for: CVE-2023-5367, CVE-2023-5380 -* Thu Aug 25 2016 Hans de Goede - 1.18.4-3 -- Various switchable-graphics / prime fixes from upstream, mostly - related to using the modesetting driver in prime setups -- Fix Xorg -configure not working (rhbz#1368502) +* Fri Oct 20 2023 José Expósito +- SPDX migration: license is already SPDX compatible -* Fri Aug 19 2016 Kalev Lember - 1.18.4-2 -- Backport a number of XWayland fixes from master +* Fri Sep 29 2023 Orion Poplawski - 1.20.14-25 +- Fix xvfb-run --error-file / auth-file options -* Tue Jul 19 2016 Adam Jackson - 1.18.4-1 -- xserver 1.18.4 +* Sat Jul 22 2023 Fedora Release Engineering - 1.20.14-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild -* Mon Jul 04 2016 Olivier Fourdan 1.18.3-8 -- Fix segfault in Xwayland due to cursor update after unrealize (#1338979) +* Tue Apr 25 2023 Olivier Fourdan - 1.20.14-23 +- Backport fix for a deadlock with DRI3 (#2189434) -* Tue Jun 28 2016 Peter Hutterer 1.18.3-7 -- Fix segfault caused by forced indicator update (#1335439) +* Thu Apr 13 2023 Florian Weimer - 1.20.14-22 +- Make more functions available in fb.h with !FB_ACCESS_WRAPPER -* Fri Jun 17 2016 Hans de Goede - 1.18.3-6 -- Add switchable-graphics / prime fixes from f24 branch -- Add some more switchable-graphics / prime fixes from upstream +* Wed Mar 29 2023 Olivier Fourdan - 1.20.14-21 +- CVE fix for: CVE-2023-1393 -* Mon Jun 13 2016 Adam Jackson - 1.18.3-5 -- Restore DRI1 for now +* Thu Feb 23 2023 Olivier Fourdan - 1.20.14-20 +- Fix xvfb-run script with --listen-tcp -* Mon May 09 2016 Adam Jackson - 1.18.3-4 -- Move a symbol from DRI1 to DRI2 code to fix ati/openchrome +* Thu Feb 09 2023 Iker Pedrosa - 1.20.14-19 +- Remove pam_console from service file (#1822209) -* Thu May 05 2016 Peter Hutterer 1.18.3-3 -- Fix NumLock indicator light turning off after layout change (#1047151) +* Thu Feb 02 2023 Peter Hutterer - 1.20.14-18 +- CVE-2023-0494: potential use-after-free -* Thu Apr 14 2016 Adam Jackson - 1.18.3-2 -- Stop building DRI1 support -- Don't build DRI2 on s390{,x} +* Wed Feb 01 2023 Peter Hutterer - 1.20.14-17 +- Updated conditional fedora statement -* Mon Apr 04 2016 Adam Jackson 1.18.3-1 -- xserver 1.18.3 +* Tue Jan 17 2023 Olivier Fourdan - 1.20.14-16 +- Use the recommended way to apply conditional patches without + conditionalizing the sources (for byte-swapped clients). -* Thu Mar 17 2016 Adam Jackson 1.18.2-2 -- Fix red tint artifacts in glamor -- Fix a performance cliff in present triggered by plasma -- Silence some xf86vidmode log spam +* Fri Jan 13 2023 Leif Liddy 1.20.14-15 +- Xorg server does not correctly select the DCP for the display + without a quirk on Apple silicon machines (#2152414) -* Fri Mar 11 2016 Adam Jackson 1.18.2-1 -- xserver 1.18.2 +* Fri Jan 13 2023 Peter Hutterer - 1.20.14-14 +- Disallow byte-swapped clients (#2159489) -* Wed Mar 09 2016 Peter Hutterer 1.18.1-3 -- Stop bug warnings on three-finger pinch gestures (#1282252) +* Wed Jan 11 2023 Olivier Fourdan - 1.20.14-13 +- Rename boolean config value field from bool to boolean to fix drivers + build failures due to a conflict with C++ and stdbool.h -* Mon Feb 15 2016 Dave Airlie 1.18.1-2 -- fix issues with reverse prime and present. +* Mon Dec 19 2022 Peter Hutterer - 1.20.14-12 +- Fix buggy patch to CVE-2022-46340 -* Mon Feb 08 2016 Adam Jackson 1.18.1-1 -- xserver 1.18.1 +* Wed Dec 14 2022 Peter Hutterer 1.20.14-11 +- CVE fix for: CVE-2022-4283, CVE-2022-46340, CVE-2022-46341, + CVE-2022-46342, CVE-2022-46343, CVE-2022-46344 -* Fri Feb 05 2016 Fedora Release Engineering - 1.18.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild +* Wed Nov 23 2022 Peter Hutterer - 1.20.14-10 +- Drop dependency on xorg-x11-font-utils, it was only there for on + build-time variable that's always the same value anyway (#2145088) -* Mon Nov 16 2015 Hans de Goede - 1.18.0-2 -- Fix Xorg.wrap kms detection to so that the server does not always run - as root +* Tue Nov 8 2022 Olivier Fourdan - 1.20.14-9 +- Fix CVE-2022-3550, CVE-2022-3551 -* Mon Nov 09 2015 Adam Jackson 1.18.0-1 -- xserver 1.18.0 +* Sat Jul 23 2022 Fedora Release Engineering - 1.20.14-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild -* Tue Oct 27 2015 Dave Airlie 1.18.0-0.6 -- update to git snapshot of 1.7.99.902 (1.18.0 rc2) +* Tue Jul 12 2022 Olivier Fourdan - 1.20.14-7 +- Fix CVE-2022-2319/ZDI-CAN-16062, CVE-2022-2320/ZDI-CAN-16070 -* Wed Oct 14 2015 Hans de Goede - 1.18.0-0.5 -- Fix xorg sometimes crashing on machine poweroff/shutdown (#1269210) +* Wed Apr 13 2022 Dominik Mierzejewski - 1.20.14-6 +- Don't hardcode fps for fake screen (#2054188) -* Thu Sep 24 2015 Rex Dieter 1.18.0-0.4 -- pull in candidate fix for clients getting stuck waiting indefinitely - for an idle event when a CRTC is turned off (#1256082,#1258084) +* Fri Apr 8 2022 Jocelyn Falempe - 1.20.14-5 +- Fix basic graphic mode not working with simpledrm (#2067151) -* Tue Sep 22 2015 Dave Airlie 1.18.0-0.3 -- hack to fix GLX_MESA_copy_sub_buffer regression (#1265395) +* Fri Jan 28 2022 Olivier Fourdan - 1.20.14-4 +- Fix build with GCC 12 (#2047134) -* Mon Sep 07 2015 Dave Airlie 1.18.0-0.2 -- update to git snapshot of 1.7.99 (1.18.0 rc1) +* Tue Jan 25 2022 Olivier Fourdan - 1.20.14-3 +- Fix crash with NVIDIA proprietary driver with Present (#2046147) -* Wed Jul 29 2015 Dave Airlie 1.18.0-0.1 -- git snapshot of what will be 1.18.0 (should be ABI stable) - -* Wed Jul 15 2015 Dave Airlie 1.17.2-2 -- fix bug with glamor and PRIME where server would crash - -* Tue Jun 16 2015 Adam Jackson 1.17.2-1 -- xserver 1.17.2 - -* Tue Jun 16 2015 Dave Airlie 1.17.1-16 -- fix bug with glamor and overlapping copies - -* Wed Jun 10 2015 Ray Strode 1.17.1-15 -- CVE-2015-3164 - -* Tue May 26 2015 Peter Hutterer 1.17.1-14 -- Add the unaccelerated valuator masks, fixes nonmoving mouse in SDL - (#1208992) - -* Wed May 20 2015 Kalev Lember - 1.17.1-13 -- Obsolete xorg-x11-drv-void - -* Tue May 19 2015 Hans de Goede - 1.17.1-12 -- Fix "start -- vt7" not working fix breaking headless setups (#1203780) - -* Sat May 02 2015 Adel Gadllah - 1.17.1-11 -- modesetting: Fix software cursor fallback (#1205725) - -* Thu Apr 30 2015 Hans de Goede - 1.17.1-10 -- Fix "start -- vt7" not working (#1203780) - -* Sat Apr 11 2015 Ray Strode 1.17.1-9 -- Handle logind timeouts more gracefuly. -- Bump timeouts so they don't happen in practice - Fixes X on some old optimus and other hybrid hardware - Related: #1209347 - -* Thu Apr 09 2015 Adam Jackson 1.17.1-8 -- Fix endian detection code (#1206060) - -* Wed Mar 18 2015 Hans de Goede - 1.17.1-7 -- Modify the server wrapper to not always start the server as root. - Callers of the server which start it in a way which is compatible with the - server running without root rights can now set a XORG_RUN_AS_USER_OK env - variable and then the wrapper will behave as if needs_root_rights = auto - is specified, unless overriden from Xwrapper.config - -* Wed Mar 04 2015 Adam Jackson 1.17.1-6 -- Fix int10 interrupt vector setup - -* Mon Mar 02 2015 Dave Airlie 1.17.1-5 -- omg, define something to 0 makes it work, security. - -* Mon Mar 02 2015 Dave Airlie 1.17.1-4 -- require lazy relocations to work, remove cement - -* Sat Feb 21 2015 Till Maas - 1.17.1-3 -- Rebuilt for Fedora 23 Change - https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code - -* Tue Feb 17 2015 Dave Airlie 1.17.1-2 -- fix regression in SI:localuser handling - -* Wed Feb 11 2015 Hans de Goede - 1.17.1-1 -- New upstream release 1.17.1 (rhbz#1144404) -- xorg-x11-drv-modesetting is now included in xorg-x11-server-Xorg, - obsolete it -- Fix xorg-x11-drv-r128 obsoletes (rhbz#1176791) - -* Fri Feb 06 2015 Peter Hutterer 1.16.2.901-3 -- CVE-2015-0255: unchecked XKB string lengths - -* Thu Feb 05 2015 Ray Strode 1.16.2.901-2 -- Add patch from ickle to fix flicker on login / durin vt switch - see https://bugzilla.gnome.org/show_bug.cgi?id=737226 - -* Wed Dec 10 2014 Dave Airlie 1.16.2.901-1 -- upstream security release. 1.16.2.901 - -* Fri Nov 21 2014 Dave Airlie 1.16.2-1 -- New upstream bugfix release 1.16.2 - -* Fri Nov 21 2014 Dave Airlie 1.16.1-2 -- backport glamor DRI3 sync integration from upstream - -* Fri Oct 3 2014 Hans de Goede - 1.16.1-1 -- New upstream bugfix release 1.16.1 (rhbz#1144404) - -* Thu Sep 11 2014 Adam Jackson 1.16.0-10 -- Only send GLX_BufferSwapComplete for PresentCompleteKindPixmap - -* Wed Sep 10 2014 Hans de Goede - 1.16.0-9 -- Fixup Xwayland summary, remove . at end of summaries (rhbz#1140225) - -* Tue Sep 09 2014 Kalev Lember - 1.16.0-8 -- Update the versions of obsoletes for dropped drivers - -* Tue Sep 2 2014 Hans de Goede - 1.16.0-7 -- Drop Fedora specific xorg-non-pci.patch, replace with solution from - upstream - -* Thu Aug 28 2014 Hans de Goede - 1.16.0-6 -- drop no longer valid configure arguments (rhbz#1133350) - -* Mon Aug 25 2014 Peter Robinson 1.16.0-5 -- re-add support for non pci platform devices - -* Mon Aug 18 2014 Fedora Release Engineering - 1.16.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Fri Aug 8 2014 Hans de Goede - 1.16.0-3 -- Really fix conditionals to allow building on F-20 (rhbz#1127351) - -* Thu Aug 7 2014 Hans de Goede - 1.16.0-2 -- Fix xwayland conditionals to allow building on F-20 (rhbz#1127351) - -* Mon Jul 28 2014 Hans de Goede - 1.16.0-1 -- Update to 1.16.0 - -* Thu Jul 17 2014 Adam Jackson 1.15.99.904-4 -- Add Obsoletes for video drivers dropped in F21+ - -* Fri Jul 11 2014 Hans de Goede - 1.15.99.904-3 -- Fix startx crash introduced by 1.15.99.904 (rhbz#1118540) - -* Fri Jul 11 2014 Peter Hutterer 1.15.99.904-2 -- Don't force the screensaver off on DPMS unblank - -* Tue Jul 8 2014 Hans de Goede - 1.15.99.904-1 -- Update to 1.15.99.904 - -* Wed Jul 2 2014 Hans de Goede - 1.15.99.903-5 -- Fix code including glamor.h not compiling due to strndup re-definition - -* Wed Jul 02 2014 Adam Jackson 1.15.99.903-4 -- Snap xwayland damage reports to the bounding box - -* Wed Jul 2 2014 Hans de Goede - 1.15.99.903-3 -- Fix xvfb crash on client disconnect (rhbz#1113128) - -* Thu Jun 19 2014 Dennis Gilmore - 1.15.99.903-2 -- add support for non pci platform devices - -* Wed Jun 11 2014 Hans de Goede - 1.15.99.903-1 -- Update to 1.15.99.903 -- This bumps the videodrv ABI once more, so all drivers must be rebuild - -* Sun Jun 08 2014 Fedora Release Engineering - 1.15.99.902-8.20140428 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Wed May 21 2014 Adam Jackson 1.15.99.902-7 -- Don't try to build Xwayland in F20 -- Fix shadowfb initialization to, er, work - -* Wed May 14 2014 Peter Hutterer - 1.15.99.902-6.20140428 -- Revert button mapping for Evoluent Vertical mouse, the default mapping - matches the manufacturer's documentation (#612140) - -* Mon Apr 28 2014 Hans de Goede - 1.15.99.902-5.20140428 -- Add hw/xfree86/Xorg.sh.in to xorg-x11-server-source - -* Mon Apr 28 2014 Hans de Goede - 1.15.99.902-4.20140428 -- Git snapshot 20140428 -- This fixes the silent hardware cursor API break in 1.15.99.902 (#1090897) - -* Fri Apr 25 2014 Hans de Goede - 1.15.99.902-3 -- Add missing BuildRequires for dbus-devel, libepoxy-devel, mesa-libEGL-devel, - mesa-libgbm-devel and systemd-devel -- Fix compilation of int10 module on arm - -* Wed Apr 23 2014 Hans de Goede - 1.15.99.902-2 -- Add --enable-glamor to configure flags - -* Thu Apr 17 2014 Hans de Goede - 1.15.99.902-1 -- Update to 1.15.99.902 -- Drop the Xwayland as extension patch-set -- Add a new xorg-x11-server-Xwayland package with the new standalone Xwayland - server - -* Fri Feb 28 2014 Peter Hutterer 1.15.0-5 -- Search all parent devices for a PnPID. - -* Mon Feb 17 2014 Adam Williamson - 1.15.0-4 -- fix xwayland crash under mutter (RH #1065109 , BGO #724443) - -* Wed Feb 05 2014 Peter Hutterer 1.15.0-3 -- Prevent out-of-bounds access in check_butmap_change (#1061466) - -* Tue Jan 14 2014 Adam Jackson 1.15.0-2 -- exa-only-draw-valid-trapezoids.patch: Fix crash in exa. - -* Mon Jan 13 2014 Adam Jackson 1.15.0-1 -- xserver 1.15.0 - -* Tue Dec 17 2013 Adam Jackson 1.14.99.904-1 -- 1.15RC4 -- Re-disable int10 on arm - -* Mon Dec 2 2013 Peter Robinson 1.14.99.902-2 -- Add aarch64 to platforms that have libunwind - -* Wed Nov 20 2013 Adam Jackson 1.14.99.902-1 -- 1.15RC2 - -* Mon Nov 18 2013 Adam Jackson 1.14.99.901-6 -- Prefer fbdev to vesa, fixes fallback path on UEFI - -* Fri Nov 08 2013 Adam Jackson 1.14.99.901-5 -- Restore XkbCopyDeviceKeymap for (older) tigervnc - -* Fri Nov 08 2013 Adam Jackson 1.14.99.901-4 -- Explicitly enable DRI2 - -* Thu Nov 07 2013 Adam Jackson 1.14.99.901-3 -- Merge Xinerama+{Damage,Render,Composite} fix series - -* Thu Nov 07 2013 Adam Jackson 1.14.99.901-2 -- Fix build with --disable-present - -* Thu Nov 07 2013 Adam Jackson 1.14.99.901-1 -- 1.15RC1 - -* Mon Oct 28 2013 Adam Jackson 1.14.99.3-2 -- Don't build xwayland in RHEL - -* Fri Oct 25 2013 Adam Jackson 1.14.99.3-1 -- xserver 1.14.99.3 -- xwayland branch refresh -- Drop some F17-era Obsoletes -- Update BuildReqs to match reality - -* Wed Oct 23 2013 Peter Hutterer 1.14.3-6 -- Fix Xdmx cursor jumps (#1019821) - -* Tue Oct 08 2013 Adam Jackson 1.14.3-5 -- Snap wayland damage reports to the bounding box - -* Thu Oct 03 2013 Adam Jackson 1.14.3-4 -- Fix up fixing up the driver list after filtering out non-wayland - -* Wed Oct 02 2013 Adam Jackson 1.14.3-3 -- Only look at wayland-capable drivers when run with -wayland - -* Mon Sep 23 2013 Adam Jackson 1.14.3-2 -- xwayland support - -* Mon Sep 16 2013 Peter Hutterer 1.14.3-1 -- xserver 1.14.3 - -* Tue Jul 30 2013 Peter Hutterer 1.14.2-9 -- Fix active touch grabs, second touchpoint didn't get sent to client -- Fix version mismatch for XI 2.2+ clients (where a library supports > 2.2 - but another version than the originally requested one). - -* Tue Jul 30 2013 Dave Airlie 1.14.2-8 -- fixes for multi-monitor reverse optimus - -* Mon Jul 22 2013 Peter Hutterer 1.14.2-7 -- Fix erroneous valuator 1 coordinate when an absolute device in relative - mode doesn't send y coordinates. - -* Fri Jul 19 2013 Peter Hutterer 1.14.2-6 -- Add new version of the resolution-based scaling patch - scale y down - instead of x up. That gives almost the same behaviour as current - synaptics. Drop the synaptics quirk, this needs to be now removed from the - driver. - -* Mon Jul 15 2013 Peter Hutterer 1.14.2-5 -- Fix logspam when trying to free a non-existant grab. -- Update touch patch to upstream version (from fdo #66720) -- re-add xephyr resizable patch, got lost in rebase (#976995) - -* Fri Jul 12 2013 Dave Airlie 1.14.2-4 -- reapply dropped patch to fix regression (#981953) - -* Tue Jul 09 2013 Peter Hutterer 1.14.2-3 -- Fix crash on 32-bit with virtual box guest additions (#972095) - -* Tue Jul 09 2013 Peter Hutterer 1.14.2-2 -- Fix crash in gnome-shell when tapping a menu twice (fdo #66720) - -* Thu Jul 04 2013 Peter Hutterer 1.14.2-1 -- xorg-server 1.4.2 -- drop merged patches -- Add a quirk to set the synaptics resolution to 0 by default. The pre-scale - patch in the server clashes with synaptics inaccurate resolution numbers, - causing the touchpad movement to be stunted. - -* Thu Jun 06 2013 Peter Hutterer 1.14.1.901-2 -- Backport the touch grab race condition patches from fdo #56578 - -* Thu Jun 06 2013 Peter Hutterer 1.14.1.901-1 -- xserver 1.14.2RC1 - -* Tue Jun 04 2013 Peter Hutterer 1.14.1-4 -- Update quirks for trackballs and the La-VIEW Technology Naos 5000 mouse +* Sat Jan 22 2022 Fedora Release Engineering - 1.20.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/xserver-autobind-hotplug.patch b/xserver-autobind-hotplug.patch deleted file mode 100644 index 8025cbd..0000000 --- a/xserver-autobind-hotplug.patch +++ /dev/null @@ -1,302 +0,0 @@ -From 4471df41ea6e94834a2b10643ca7fcd69682d276 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Fri, 17 Aug 2012 09:49:24 +1000 -Subject: [PATCH xserver v3] autobind GPUs to the screen - -This is a modified version of a patch we've been carry-ing in Fedora and -RHEL for years now. This patch automatically adds secondary GPUs to the -master as output sink / offload source making e.g. the use of -slave-outputs just work, with requiring the user to manually run -"xrandr --setprovideroutputsource" before he can hookup an external -monitor to his hybrid graphics laptop. - -There is one problem with this patch, which is why it was not upstreamed -before. What to do when a secondary GPU gets detected really is a policy -decission (e.g. one may want to autobind PCI GPUs but not USB ones) and -as such should be under control of the Desktop Environment. - -Unconditionally adding autobinding support to the xserver will result -in races between the DE dealing with the hotplug of a secondary GPU -and the server itself dealing with it. - -However we've waited for years for any Desktop Environments to actually -start doing some sort of autoconfiguration of secondary GPUs and there -is still not a single DE dealing with this, so I believe that it is -time to upstream this now. - -To avoid potential future problems if any DEs get support for doing -secondary GPU configuration themselves, the new autobind functionality -is made optional. Since no DEs currently support doing this themselves it -is enabled by default. When DEs grow support for doing this themselves -they can disable the servers autobinding through the servers cmdline or a -xorg.conf snippet. - -Signed-off-by: Dave Airlie -[hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream] -Signed-off-by: Hans de Goede ---- -Changes in v2: --Make the default enabled instead of installing a xorg.conf - snippet which enables it unconditionally -Changes in v3: --Handle GPUScreen autoconfig in randr/rrprovider.c, looking at - rrScrPriv->provider, rather then in hw/xfree86/modes/xf86Crtc.c - looking at xf86CrtcConfig->provider. This fixes the autoconfig not - working with the nvidia binary driver ---- - hw/xfree86/common/xf86Config.c | 19 +++++++++++++++++++ - hw/xfree86/common/xf86Globals.c | 2 ++ - hw/xfree86/common/xf86Init.c | 20 ++++++++++++++++++++ - hw/xfree86/common/xf86Priv.h | 1 + - hw/xfree86/common/xf86Privstr.h | 1 + - hw/xfree86/common/xf86platformBus.c | 4 ++++ - hw/xfree86/man/Xorg.man | 7 +++++++ - hw/xfree86/man/xorg.conf.man | 6 ++++++ - randr/randrstr.h | 3 +++ - randr/rrprovider.c | 22 ++++++++++++++++++++++ - 10 files changed, 85 insertions(+) - -diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c -index 21daf1a..df3ca50 100644 ---- a/hw/xfree86/common/xf86Config.c -+++ b/hw/xfree86/common/xf86Config.c -@@ -719,6 +719,7 @@ typedef enum { - FLAG_DRI2, - FLAG_USE_SIGIO, - FLAG_AUTO_ADD_GPU, -+ FLAG_AUTO_BIND_GPU, - FLAG_MAX_CLIENTS, - FLAG_IGLX, - } FlagValues; -@@ -778,6 +779,8 @@ static OptionInfoRec FlagOptions[] = { - {0}, FALSE}, - {FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN, - {0}, FALSE}, -+ {FLAG_AUTO_BIND_GPU, "AutoBindGPU", OPTV_BOOLEAN, -+ {0}, FALSE}, - {FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER, - {0}, FALSE }, - {FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN, -@@ -857,6 +860,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) - } - xf86Msg(from, "%sutomatically adding GPU devices\n", - xf86Info.autoAddGPU ? "A" : "Not a"); -+ -+ if (xf86AutoBindGPUDisabled) { -+ xf86Info.autoBindGPU = FALSE; -+ from = X_CMDLINE; -+ } -+ else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_BIND_GPU)) { -+ xf86GetOptValBool(FlagOptions, FLAG_AUTO_BIND_GPU, -+ &xf86Info.autoBindGPU); -+ from = X_CONFIG; -+ } -+ else { -+ from = X_DEFAULT; -+ } -+ xf86Msg(from, "%sutomatically binding GPU devices\n", -+ xf86Info.autoBindGPU ? "A" : "Not a"); -+ - /* - * Set things up based on the config file information. Some of these - * settings may be overridden later when the command line options are -diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c -index e962b75..0d1e31b 100644 ---- a/hw/xfree86/common/xf86Globals.c -+++ b/hw/xfree86/common/xf86Globals.c -@@ -136,6 +136,7 @@ xf86InfoRec xf86Info = { - #else - .autoAddGPU = FALSE, - #endif -+ .autoBindGPU = TRUE, - }; - - const char *xf86ConfigFile = NULL; -@@ -197,6 +198,7 @@ Bool xf86FlipPixels = FALSE; - Gamma xf86Gamma = { 0.0, 0.0, 0.0 }; - - Bool xf86AllowMouseOpenFail = FALSE; -+Bool xf86AutoBindGPUDisabled = FALSE; - - #ifdef XF86VIDMODE - Bool xf86VidModeDisabled = FALSE; -diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c -index a544b65..b0cba3d 100644 ---- a/hw/xfree86/common/xf86Init.c -+++ b/hw/xfree86/common/xf86Init.c -@@ -76,6 +76,7 @@ - #include "xf86DDC.h" - #include "xf86Xinput.h" - #include "xf86InPriv.h" -+#include "xf86Crtc.h" - #include "picturestr.h" - - #include "xf86Bus.h" -@@ -298,6 +299,19 @@ xf86PrivsElevated(void) - } - - static void -+xf86AutoConfigOutputDevices(void) -+{ -+ int i; -+ -+ if (!xf86Info.autoBindGPU) -+ return; -+ -+ for (i = 0; i < xf86NumGPUScreens; i++) -+ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]), -+ xf86ScrnToScreen(xf86Screens[0])); -+} -+ -+static void - InstallSignalHandlers(void) - { - /* -@@ -871,6 +885,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) - for (i = 0; i < xf86NumGPUScreens; i++) - AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); - -+ xf86AutoConfigOutputDevices(); -+ - xf86VGAarbiterWrapFunctions(); - if (sigio_blocked) - input_unlock(); -@@ -1389,6 +1405,10 @@ ddxProcessArgument(int argc, char **argv, int i) - xf86Info.iglxFrom = X_CMDLINE; - return 0; - } -+ if (!strcmp(argv[i], "-noautoBindGPU")) { -+ xf86AutoBindGPUDisabled = TRUE; -+ return 1; -+ } - - /* OS-specific processing */ - return xf86ProcessArgument(argc, argv, i); -diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h -index c1f8a18..9a3d0df 100644 ---- a/hw/xfree86/common/xf86Priv.h -+++ b/hw/xfree86/common/xf86Priv.h -@@ -46,6 +46,7 @@ - extern _X_EXPORT const char *xf86ConfigFile; - extern _X_EXPORT const char *xf86ConfigDir; - extern _X_EXPORT Bool xf86AllowMouseOpenFail; -+extern _X_EXPORT Bool xf86AutoBindGPUDisabled; - - #ifdef XF86VIDMODE - extern _X_EXPORT Bool xf86VidModeDisabled; -diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h -index c29b3cc..4c5f54b 100644 ---- a/hw/xfree86/common/xf86Privstr.h -+++ b/hw/xfree86/common/xf86Privstr.h -@@ -102,6 +102,7 @@ typedef struct { - MessageType dri2From; - - Bool autoAddGPU; -+ Bool autoBindGPU; - } xf86InfoRec, *xf86InfoPtr; - - #ifdef DPMSExtension -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index 063e81c..42789ca 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -48,6 +48,7 @@ - #include "Pci.h" - #include "xf86platformBus.h" - #include "xf86Config.h" -+#include "xf86Crtc.h" - - #include "randrstr.h" - int platformSlotClaimed; -@@ -579,6 +580,9 @@ xf86platformAddDevice(int index) - } - /* attach unbound to 0 protocol screen */ - AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); -+ if (xf86Info.autoBindGPU) -+ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]), -+ xf86ScrnToScreen(xf86Screens[0])); - - RRResourcesChanged(xf86Screens[0]->pScreen); - RRTellChanged(xf86Screens[0]->pScreen); -diff --git a/hw/xfree86/man/Xorg.man b/hw/xfree86/man/Xorg.man -index def9bfc..8df6b7d 100644 ---- a/hw/xfree86/man/Xorg.man -+++ b/hw/xfree86/man/Xorg.man -@@ -283,6 +283,13 @@ is a comma separated list of directories to search for - server modules. This option is only available when the server is run - as root (i.e, with real-uid 0). - .TP 8 -+.B \-noautoBindGPU -+Disable automatically setting secondary GPUs up as output sinks and offload -+sources. This is equivalent to setting the -+.B AutoBindGPU -+xorg.conf(__filemansuffix__) file option. To -+.B false. -+.TP 8 - .B \-nosilk - Disable Silken Mouse support. - .TP 8 -diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man -index 7d0c524..3e596e4 100644 ---- a/hw/xfree86/man/xorg.conf.man -+++ b/hw/xfree86/man/xorg.conf.man -@@ -673,6 +673,12 @@ Enabled by default. - If this option is disabled, then no GPU devices will be added from the udev - backend. Enabled by default. (May need to be disabled to setup Xinerama). - .TP 7 -+.BI "Option \*qAutoBindGPU\*q \*q" boolean \*q -+If enabled then secondary GPUs will be automatically set up as output-sinks and -+offload-sources. Making e.g. laptop outputs connected only to the secondary -+GPU directly available for use without needing to run -+"xrandr --setprovideroutputsource". Enabled by default. -+.TP 7 - .BI "Option \*qLog\*q \*q" string \*q - This option controls whether the log is flushed and/or synced to disk after - each message. -diff --git a/randr/randrstr.h b/randr/randrstr.h -index 706e9a7..66999d5 100644 ---- a/randr/randrstr.h -+++ b/randr/randrstr.h -@@ -976,6 +976,9 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p); - extern _X_EXPORT void - RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider); - -+extern _X_EXPORT void -+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen); -+ - /* rrproviderproperty.c */ - - extern _X_EXPORT void -diff --git a/randr/rrprovider.c b/randr/rrprovider.c -index f9df67e..abc5685 100644 ---- a/randr/rrprovider.c -+++ b/randr/rrprovider.c -@@ -482,3 +482,25 @@ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider) - - WriteEventsToClient(client, 1, (xEvent *) &pe); - } -+ -+void -+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen) -+{ -+ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); -+ rrScrPrivPtr masterPriv = rrGetScrPriv(masterScreen); -+ RRProviderPtr provider = pScrPriv->provider; -+ RRProviderPtr master_provider = masterPriv->provider; -+ -+ if (!provider || !master_provider) -+ return; -+ -+ if ((provider->capabilities & RR_Capability_SinkOutput) && -+ (master_provider->capabilities & RR_Capability_SourceOutput)) { -+ pScrPriv->rrProviderSetOutputSource(pScreen, provider, master_provider); -+ RRInitPrimeSyncProps(pScreen); -+ } -+ -+ if ((provider->capabilities & RR_Capability_SourceOffload) && -+ (master_provider->capabilities & RR_Capability_SinkOffload)) -+ pScrPriv->rrProviderSetOffloadSink(pScreen, provider, master_provider); -+} --- -2.9.3 - diff --git a/xserver-sdk-abi-requires.git b/xserver-sdk-abi-requires.git deleted file mode 100755 index c033061..0000000 --- a/xserver-sdk-abi-requires.git +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# The X server provides capabilities of the form: -# -# Provides: xserver-abi(ansic-0) = 4 -# -# for an ABI version of 0.4. The major number is encoded into the name so -# that major number changes force upgrades. If we didn't, then -# -# Requires: xserver-abi(ansic) >= 0.4 -# -# would also match 1.0, which is wrong since major numbers mean an ABI break. - -echo "xserver-abi($1-@MAJOR@) >= @MINOR@" diff --git a/xserver-sdk-abi-requires.release b/xserver-sdk-abi-requires.release deleted file mode 100755 index 30d77bf..0000000 --- a/xserver-sdk-abi-requires.release +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# The X server provides capabilities of the form: -# -# Provides: xserver-abi(ansic-0) = 4 -# -# for an ABI version of 0.4. The major number is encoded into the name so -# that major number changes force upgrades. If we didn't, then -# -# Requires: xserver-abi(ansic) >= 0.4 -# -# would also match 1.0, which is wrong since major numbers mean an ABI break. - -ver=$(pkg-config --variable abi_$1 xorg-server) - -major=$(echo $ver | cut -f 1 -d .) -minor=$(echo $ver | cut -f 2 -d .) - -echo "xserver-abi($1-$major) >= $minor" diff --git a/xserver.pamd b/xserver.pamd index bf79930..9374ff6 100644 --- a/xserver.pamd +++ b/xserver.pamd @@ -1,5 +1,4 @@ #%PAM-1.0 auth sufficient pam_rootok.so -auth required pam_console.so account required pam_permit.so session optional pam_keyinit.so force revoke diff --git a/xvfb-run.sh b/xvfb-run.sh index de5fa39..dec7dfc 100644 --- a/xvfb-run.sh +++ b/xvfb-run.sh @@ -31,7 +31,7 @@ SERVERNUM=99 AUTHFILE= ERRORFILE=/dev/null STARTWAIT=3 -XVFBARGS="-screen 0 640x480x8" +XVFBARGS="-screen 0 640x480x24" LISTENTCP="-nolisten tcp" XAUTHPROTO=. @@ -64,7 +64,10 @@ Usage: $PROGNAME [OPTION ...] COMMAND Run COMMAND (usually an X client) in a virtual X server environment. Options: -a --auto-servernum try to get a free server number, starting at - --server-num + --server-num (deprecated, use --auto-display + instead) +-d --auto-display use the X server to find a display number + automatically -e FILE --error-file=FILE file used to store xauth errors and Xvfb output (default: $ERRORFILE) -f FILE --auth-file=FILE file used to store auth cookie @@ -97,8 +100,8 @@ find_free_servernum() { } # Parse the command line. -ARGS=$(getopt --options +ae:f:hn:lp:s:w: \ - --long auto-servernum,error-file:auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \ +ARGS=$(getopt --options +ade:f:hn:lp:s:w: \ + --long auto-servernum,error-file:,auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \ --name "$PROGNAME" -- "$@") GETOPT_STATUS=$? @@ -112,11 +115,12 @@ eval set -- "$ARGS" while :; do case "$1" in -a|--auto-servernum) SERVERNUM=$(find_free_servernum) ;; + -d|--auto-display) AUTO_DISPLAY=1 ;; -e|--error-file) ERRORFILE="$2"; shift ;; -f|--auth-file) AUTHFILE="$2"; shift ;; -h|--help) SHOWHELP="yes" ;; -n|--server-num) SERVERNUM="$2"; shift ;; - -l|--listen-tcp) LISTENTCP="" ;; + -l|--listen-tcp) LISTENTCP="-listen tcp" ;; -p|--xauth-protocol) XAUTHPROTO="$2"; shift ;; -s|--server-args) XVFBARGS="$2"; shift ;; -w|--wait) STARTWAIT="$2"; shift ;; @@ -143,23 +147,34 @@ if ! type xauth >/dev/null; then exit 3 fi +# Set up the temp dir for the pid and X authorization file +XVFB_RUN_TMPDIR="$(mktemp --directory --tmpdir $PROGNAME.XXXXXX)" # If the user did not specify an X authorization file to use, set up a temporary # directory to house one. if [ -z "$AUTHFILE" ]; then - XVFB_RUN_TMPDIR="$(mktemp --directory --tmpdir $PROGNAME.XXXXXX)" AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority.XXXXXX) fi # Start Xvfb. MCOOKIE=$(mcookie) +if [ -z "$AUTO_DISPLAY" ]; then + # Old style using a pre-computed SERVERNUM + XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" \ + 2>&1 & + XVFBPID=$! +else + # New style using Xvfb to provide a free display + PIDFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" pid.XXXXXX) + SERVERNUM=$(XAUTHORITY=$AUTHFILE Xvfb -displayfd 1 $XVFBARGS $LISTENTCP \ + 2>"$ERRORFILE" & echo $! > $PIDFILE) + XVFBPID=$(cat $PIDFILE) +fi +sleep "$STARTWAIT" + XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1 add :$SERVERNUM $XAUTHPROTO $MCOOKIE EOF -XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" \ - 2>&1 & -XVFBPID=$! -sleep "$STARTWAIT" # Start the command and save its exit status. set +e