1
0

Accepting request 731423 from home:iznogood:branches:X11:XOrg

- Add U_xwayland-Separate-DamagePtr-into-separate-window-data.patch
  and U_xwayland-Allow-passing-a-fd.patch: Needed for gnome 3.34
  new and experimental xwayland on demand feature.
- Rebase patches with quilt.

OBS-URL: https://build.opensuse.org/request/show/731423
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=744
This commit is contained in:
Stefan Dirsch 2019-09-18 12:48:07 +00:00 committed by Git OBS Bridge
parent 418936d994
commit c2276ffaed
21 changed files with 528 additions and 129 deletions

View File

@ -11,11 +11,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
hw/xfree86/drivers/modesetting/driver.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 8f60eae..a81efaf 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -858,6 +858,17 @@ PreInit(ScrnInfoPtr pScrn, int flags)
Index: xorg-server-1.20.5/hw/xfree86/drivers/modesetting/driver.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/drivers/modesetting/driver.c
+++ xorg-server-1.20.5/hw/xfree86/drivers/modesetting/driver.c
@@ -980,6 +980,17 @@ PreInit(ScrnInfoPtr pScrn, int flags)
if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_SW_CURSOR, FALSE)) {
ms->drmmode.sw_cursor = TRUE;

View File

@ -14,11 +14,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
hw/xfree86/Makefile.am | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 85bd0be..461e818 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -108,9 +108,10 @@ if INSTALL_SETUID
Index: xorg-server-1.20.5/hw/xfree86/Makefile.am
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/Makefile.am
+++ xorg-server-1.20.5/hw/xfree86/Makefile.am
@@ -113,9 +113,10 @@ if INSTALL_SETUID
endif
if SUID_WRAPPER
$(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR)

View File

@ -8,7 +8,7 @@ Index: hw/xfree86/common/xf86pciBus.c
===================================================================
--- hw/xfree86/common/xf86pciBus.c.orig
+++ hw/xfree86/common/xf86pciBus.c
@@ -1185,6 +1185,13 @@ xf86VideoPtrToDriverList(struct pci_devi
@@ -1186,6 +1186,13 @@ xf86VideoPtrToDriverList(struct pci_devi
driverList[0] = "neomagic";
break;
case 0x10de:
@ -22,7 +22,7 @@ Index: hw/xfree86/common/xf86pciBus.c
case 0x12d2:
{
int idx = 0;
@@ -1196,7 +1203,8 @@ xf86VideoPtrToDriverList(struct pci_devi
@@ -1197,7 +1204,8 @@ xf86VideoPtrToDriverList(struct pci_devi
break;
}
case 0x1106:

View File

@ -6,7 +6,7 @@ Index: hw/xfree86/common/xf86Helper.c
===================================================================
--- hw/xfree86/common/xf86Helper.c.orig
+++ hw/xfree86/common/xf86Helper.c
@@ -922,12 +922,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
@@ -875,12 +875,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) {
from = X_CONFIG;
if (pScrn->widthmm > 0) {
@ -33,7 +33,7 @@ Index: hw/xfree86/common/xf86Helper.c
}
if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
pScrn->yDpi = pScrn->xDpi;
@@ -966,12 +976,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
@@ -919,12 +929,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
pScrn->widthmm = ddcWidthmm;
pScrn->heightmm = ddcHeightmm;
if (pScrn->widthmm > 0) {

View File

@ -9,7 +9,7 @@ Index: hw/xfree86/common/xf86AutoConfig.c
===================================================================
--- hw/xfree86/common/xf86AutoConfig.c.orig
+++ hw/xfree86/common/xf86AutoConfig.c
@@ -75,6 +75,13 @@
@@ -77,6 +77,13 @@
"\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
"EndSection\n\n"
@ -23,7 +23,7 @@ Index: hw/xfree86/common/xf86AutoConfig.c
#define BUILTIN_LAYOUT_SECTION_PRE \
"Section \"ServerLayout\"\n" \
"\tIdentifier\t\"Builtin Default Layout\"\n"
@@ -187,8 +187,12 @@ xf86AutoConfig(void)
@@ -187,8 +194,12 @@ xf86AutoConfig(void)
snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION,
md.matches[i], 0, md.matches[i]);
AppendToConfig(buf);
@ -37,4 +37,4 @@ Index: hw/xfree86/common/xf86AutoConfig.c
+ md.matches[i], 0, md.matches[i], 0);
AppendToConfig(buf);
}

View File

@ -8,11 +8,11 @@ Zap the server if a second ctrl-alt-backspace is sent
within 2 seconds.
This can be enabled with a new option flag "ZapWarning"
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Config.c
Index: xorg-server-1.20.5/hw/xfree86/common/xf86Config.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Config.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Config.c
@@ -680,6 +680,7 @@ typedef enum {
--- xorg-server-1.20.5.orig/hw/xfree86/common/xf86Config.c
+++ xorg-server-1.20.5/hw/xfree86/common/xf86Config.c
@@ -622,6 +622,7 @@ typedef enum {
FLAG_NOTRAPSIGNALS,
FLAG_DONTVTSWITCH,
FLAG_DONTZAP,
@ -20,7 +20,7 @@ Index: xorg-server-1.12.1/hw/xfree86/common/xf86Config.c
FLAG_DONTZOOM,
FLAG_DISABLEVIDMODE,
FLAG_ALLOWNONLOCAL,
@@ -717,6 +718,8 @@ static OptionInfoRec FlagOptions[] = {
@@ -659,6 +660,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE},
{FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN,
{0}, FALSE},
@ -29,7 +29,7 @@ Index: xorg-server-1.12.1/hw/xfree86/common/xf86Config.c
{FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN,
{0}, FALSE},
{FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN,
@@ -805,6 +805,7 @@ configServerFlags(XF86ConfFlagsPtr flags
@@ -740,6 +743,7 @@ configServerFlags(XF86ConfFlagsPtr flags
xf86GetOptValBool(FlagOptions, FLAG_NOTRAPSIGNALS, &xf86Info.notrapSignals);
xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch);
xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap);
@ -37,11 +37,11 @@ Index: xorg-server-1.12.1/hw/xfree86/common/xf86Config.c
xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom);
xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Events.c
Index: xorg-server-1.20.5/hw/xfree86/common/xf86Events.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Events.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Events.c
@@ -182,13 +182,25 @@ xf86ProcessActionEvent(ActionEvent actio
--- xorg-server-1.20.5.orig/hw/xfree86/common/xf86Events.c
+++ xorg-server-1.20.5/hw/xfree86/common/xf86Events.c
@@ -166,13 +166,25 @@ xf86ProcessActionEvent(ActionEvent actio
DebugF("ProcessActionEvent(%d,%p)\n", (int) action, arg);
switch (action) {
case ACTION_TERMINATE:
@ -72,11 +72,11 @@ Index: xorg-server-1.12.1/hw/xfree86/common/xf86Events.c
break;
case ACTION_NEXT_MODE:
if (!xf86Info.dontZoom)
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Globals.c
Index: xorg-server-1.20.5/hw/xfree86/common/xf86Globals.c
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Globals.c
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Globals.c
@@ -108,6 +108,7 @@ xf86InfoRec xf86Info = {
--- xorg-server-1.20.5.orig/hw/xfree86/common/xf86Globals.c
+++ xorg-server-1.20.5/hw/xfree86/common/xf86Globals.c
@@ -107,6 +107,7 @@ xf86InfoRec xf86Info = {
.autoVTSwitch = TRUE,
.ShareVTs = FALSE,
.dontZap = FALSE,
@ -84,11 +84,11 @@ Index: xorg-server-1.12.1/hw/xfree86/common/xf86Globals.c
.dontZoom = FALSE,
.notrapSignals = FALSE,
.currentScreen = NULL,
Index: xorg-server-1.12.1/hw/xfree86/common/xf86Privstr.h
Index: xorg-server-1.20.5/hw/xfree86/common/xf86Privstr.h
===================================================================
--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Privstr.h
+++ xorg-server-1.12.1/hw/xfree86/common/xf86Privstr.h
@@ -70,6 +70,7 @@ typedef struct {
--- xorg-server-1.20.5.orig/hw/xfree86/common/xf86Privstr.h
+++ xorg-server-1.20.5/hw/xfree86/common/xf86Privstr.h
@@ -62,6 +62,7 @@ typedef struct {
Bool autoVTSwitch;
Bool ShareVTs;
Bool dontZap;

View File

@ -14,11 +14,11 @@ Reviewed-by: Adam Jackson <ajax@redhat.com>
dix/window.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/dix/window.c b/dix/window.c
index 2b599e788..f4ace76c7 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -3094,6 +3094,7 @@ int
Index: xorg-server-1.20.5/dix/window.c
===================================================================
--- xorg-server-1.20.5.orig/dix/window.c
+++ xorg-server-1.20.5/dix/window.c
@@ -3110,6 +3110,7 @@ int
dixSaveScreens(ClientPtr client, int on, int mode)
{
int rc, i, what, type;
@ -26,7 +26,7 @@ index 2b599e788..f4ace76c7 100644
if (on == SCREEN_SAVER_FORCER) {
if (mode == ScreenSaverReset)
@@ -3146,14 +3147,11 @@ dixSaveScreens(ClientPtr client, int on, int mode)
@@ -3162,14 +3163,11 @@ dixSaveScreens(ClientPtr client, int on,
* for the root window, so PaintWindow works
*/
screenIsSaved = SCREEN_SAVER_OFF;
@ -46,6 +46,3 @@ index 2b599e788..f4ace76c7 100644
screenIsSaved = SCREEN_SAVER_ON;
}
/*
--
2.16.4

View File

@ -0,0 +1,82 @@
From 7ad1d0d384085fb480e00547c22a3e8a14b514ea Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Sat, 20 Jul 2019 00:16:43 +0200
Subject: [PATCH] xwayland: Allow passing a fd for set up clients
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This FD also triggers the "wait for WM_S0" paths, so that the
compositor may set up a "maintenance line" for Xwayland, for
services that are essential to run before any client (eg. xrdb).
Those services would use this FD, disguised as an extra display
connection.
This -initfd can be seen as a generalization of -wm, a Wayland
compositor may use -initfd to launch its WM and any other clients
that should start up, or it may use -wm as a dedicated connection for
the WM and optionally use -initfd for the misc. startup clients.
If either of -wm or -initfd is passed, Xwayland will expect a selection
notification on WM_S0 before incorporating the FDs in -listen to the
poll list.
Also, correct a minor typo in the listenfd argument output,
give → given.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
---
hw/xwayland/xwayland.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 111d4fafd..3983a114c 100644
--- orig-xorg-server-1.20.5/hw/xwayland/xwayland.c 2019-05-30 20:27:34.000000000 +0200
+++ xorg-server-1.20.5/hw/xwayland/xwayland.c 2019-09-16 17:26:47.771777034 +0200
@@ -95,7 +95,8 @@
{
ErrorF("-rootless run rootless, requires wm support\n");
ErrorF("-wm fd create X client for wm on given fd\n");
- ErrorF("-listen fd add give fd as a listen socket\n");
+ ErrorF("-initfd fd add given fd as a listen socket for initialization clients\n");
+ ErrorF("-listenfd fd add given fd as a listen socket\n");
ErrorF("-eglstream use eglstream backend for nvidia GPUs\n");
}
+static int init_fd = -1;
static int wm_fd = -1;
static int listen_fds[5] = { -1, -1, -1, -1, -1 };
static int listen_fd_count = 0;
@@ -148,6 +150,11 @@ ddxProcessArgument(int argc, char *argv[], int i)
wm_fd = atoi(argv[i + 1]);
return 2;
}
+ else if (strcmp(argv[i], "-initfd") == 0) {
+ CHECK_FOR_REQUIRED_ARGUMENTS(1);
+ init_fd = atoi(argv[i + 1]);
+ return 2;
+ }
else if (strcmp(argv[i], "-shm") == 0) {
return 1;
}
@@ -1287,10 +1294,14 @@ InitOutput(ScreenInfo * screen_info, int argc, char **argv)
LocalAccessScopeUser();
- if (wm_fd >= 0) {
- TimerSet(NULL, 0, 1, add_client_fd, NULL);
+ if (wm_fd >= 0 || init_fd >= 0) {
+ if (wm_fd >= 0)
+ TimerSet(NULL, 0, 1, add_client_fd, NULL);
+ if (init_fd >= 0)
+ ListenOnOpenFD(init_fd, FALSE);
AddCallback(&SelectionCallback, wm_selection_callback, NULL);
- } else if (listen_fd_count > 0) {
+ }
+ else if (listen_fd_count > 0) {
listen_on_fds();
}
}
--
2.22.0

View File

@ -0,0 +1,307 @@
From 4e50440ae20c537d6a4edf356cda67dd33d4e5a8 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mon, 7 Jan 2019 15:20:05 +0100
Subject: [PATCH 1/3] xwayland: Separate DamagePtr into separate window data
This will be dissociated in future commits to handle the cases
where windows are being realized before there is a compositor
handling redirection.
In that case, we still want the DamagePtr to be registered upfront
on RealizeWindowProc before a corresponding xwl_window might be
created. Most notably, it cannot be lazily created on
SetWindowPixmapProc as damage accounting gets broken.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
---
hw/xwayland/xwayland.c | 74 +++++++++++++++++++++++++++++++++---------
hw/xwayland/xwayland.h | 1 -
2 files changed, 58 insertions(+), 17 deletions(-)
Index: xorg-server-1.20.5/hw/xwayland/xwayland.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xwayland/xwayland.c
+++ xorg-server-1.20.5/hw/xwayland/xwayland.c
@@ -125,6 +125,7 @@ ddxProcessArgument(int argc, char *argv[
static DevPrivateKeyRec xwl_window_private_key;
static DevPrivateKeyRec xwl_screen_private_key;
static DevPrivateKeyRec xwl_pixmap_private_key;
+static DevPrivateKeyRec xwl_damage_private_key;
static struct xwl_window *
xwl_window_get(WindowPtr window)
@@ -367,8 +368,14 @@ xwl_cursor_confined_to(DeviceIntPtr devi
static void
damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data)
{
- struct xwl_window *xwl_window = data;
- struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
+ WindowPtr window = data;
+ struct xwl_window *xwl_window = xwl_window_get(window);
+ struct xwl_screen *xwl_screen;
+
+ if (!xwl_window)
+ return;
+
+ xwl_screen = xwl_window->xwl_screen;
#ifdef GLAMOR_HAS_GBM
if (xwl_window->present_flipped) {
@@ -390,6 +397,47 @@ damage_destroy(DamagePtr pDamage, void *
{
}
+static Bool
+register_damage(WindowPtr window)
+{
+ DamagePtr damage;
+
+ damage = DamageCreate(damage_report, damage_destroy, DamageReportNonEmpty,
+ FALSE, window->drawable.pScreen, window);
+ if (damage == NULL) {
+ ErrorF("Failed creating damage\n");
+ return FALSE;
+ }
+
+ DamageRegister(&window->drawable, damage);
+ DamageSetReportAfterOp(damage, TRUE);
+
+ dixSetPrivate(&window->devPrivates, &xwl_damage_private_key, damage);
+
+ return TRUE;
+}
+
+static void
+unregister_damage(WindowPtr window)
+{
+ DamagePtr damage;
+
+ damage = dixLookupPrivate(&window->devPrivates, &xwl_damage_private_key);
+ if (!damage)
+ return;
+
+ DamageUnregister(damage);
+ DamageDestroy(damage);
+
+ dixSetPrivate(&window->devPrivates, &xwl_damage_private_key, NULL);
+}
+
+static DamagePtr
+window_get_damage(WindowPtr window)
+{
+ return dixLookupPrivate(&window->devPrivates, &xwl_damage_private_key);
+}
+
static void
shell_surface_ping(void *data,
struct wl_shell_surface *shell_surface, uint32_t serial)
@@ -470,36 +518,25 @@ send_surface_id_event(struct xwl_window
}
static Bool
-xwl_realize_window(WindowPtr window)
+ensure_surface_for_window(WindowPtr window)
{
ScreenPtr screen = window->drawable.pScreen;
struct xwl_screen *xwl_screen;
struct xwl_window *xwl_window;
struct wl_region *region;
- Bool ret;
-
- xwl_screen = xwl_screen_get(screen);
-
- screen->RealizeWindow = xwl_screen->RealizeWindow;
- ret = (*screen->RealizeWindow) (window);
- xwl_screen->RealizeWindow = screen->RealizeWindow;
- screen->RealizeWindow = xwl_realize_window;
- if (xwl_screen->rootless && !window->parent) {
- BoxRec box = { 0, 0, xwl_screen->width, xwl_screen->height };
+ if (xwl_window_get(window))
+ return TRUE;
- RegionReset(&window->winSize, &box);
- RegionNull(&window->clipList);
- RegionNull(&window->borderClip);
- }
+ xwl_screen = xwl_screen_get(screen);
if (xwl_screen->rootless) {
if (window->redirectDraw != RedirectDrawManual)
- return ret;
+ return TRUE;
}
else {
if (window->parent)
- return ret;
+ return TRUE;
}
xwl_window = calloc(1, sizeof *xwl_window);
@@ -545,25 +582,14 @@ xwl_realize_window(WindowPtr window)
wl_surface_set_user_data(xwl_window->surface, xwl_window);
- xwl_window->damage =
- DamageCreate(damage_report, damage_destroy, DamageReportNonEmpty,
- FALSE, screen, xwl_window);
- if (xwl_window->damage == NULL) {
- ErrorF("Failed creating damage\n");
- goto err_surf;
- }
-
compRedirectWindow(serverClient, window, CompositeRedirectManual);
- DamageRegister(&window->drawable, xwl_window->damage);
- DamageSetReportAfterOp(xwl_window->damage, TRUE);
-
dixSetPrivate(&window->devPrivates, &xwl_window_private_key, xwl_window);
xorg_list_init(&xwl_window->link_damage);
xwl_window_init_allow_commits(xwl_window);
- return ret;
+ return TRUE;
err_surf:
if (xwl_window->shell_surface)
@@ -575,6 +601,42 @@ err:
}
static Bool
+xwl_realize_window(WindowPtr window)
+{
+ ScreenPtr screen = window->drawable.pScreen;
+ struct xwl_screen *xwl_screen;
+ Bool ret;
+
+ xwl_screen = xwl_screen_get(screen);
+
+ screen->RealizeWindow = xwl_screen->RealizeWindow;
+ ret = (*screen->RealizeWindow) (window);
+ xwl_screen->RealizeWindow = screen->RealizeWindow;
+ screen->RealizeWindow = xwl_realize_window;
+
+ if (!ret)
+ return FALSE;
+
+ if (xwl_screen->rootless && !window->parent) {
+ BoxRec box = { 0, 0, xwl_screen->width, xwl_screen->height };
+
+ RegionReset(&window->winSize, &box);
+ RegionNull(&window->clipList);
+ RegionNull(&window->borderClip);
+ }
+
+ if (xwl_screen->rootless ?
+ (window->drawable.class == InputOutput &&
+ window->parent == window->drawable.pScreen->root) :
+ !window->parent) {
+ if (!register_damage(window))
+ return FALSE;
+ }
+
+ return ensure_surface_for_window(window);
+}
+
+static Bool
xwl_unrealize_window(WindowPtr window)
{
ScreenPtr screen = window->drawable.pScreen;
@@ -620,8 +682,8 @@ xwl_unrealize_window(WindowPtr window)
wl_surface_destroy(xwl_window->surface);
xorg_list_del(&xwl_window->link_damage);
- DamageUnregister(xwl_window->damage);
- DamageDestroy(xwl_window->damage);
+ unregister_damage(window);
+
if (xwl_window->frame_callback)
wl_callback_destroy(xwl_window->frame_callback);
@@ -638,6 +700,26 @@ xwl_save_screen(ScreenPtr pScreen, int o
}
static void
+xwl_set_window_pixmap(WindowPtr window,
+ PixmapPtr pixmap)
+{
+ ScreenPtr screen = window->drawable.pScreen;
+ struct xwl_screen *xwl_screen;
+
+ xwl_screen = xwl_screen_get(screen);
+
+ screen->SetWindowPixmap = xwl_screen->SetWindowPixmap;
+ (*screen->SetWindowPixmap) (window, pixmap);
+ xwl_screen->SetWindowPixmap = screen->SetWindowPixmap;
+ screen->SetWindowPixmap = xwl_set_window_pixmap;
+
+ if (!RegionNotEmpty(&window->winSize))
+ return;
+
+ ensure_surface_for_window(window);
+}
+
+static void
frame_callback(void *data,
struct wl_callback *callback,
uint32_t time)
@@ -689,7 +771,7 @@ xwl_window_post_damage(struct xwl_window
assert(!xwl_window->frame_callback);
- region = DamageRegion(xwl_window->damage);
+ region = DamageRegion(window_get_damage(xwl_window->window));
pixmap = (*xwl_screen->screen->GetWindowPixmap) (xwl_window->window);
#ifdef XWL_HAS_GLAMOR
@@ -726,7 +808,7 @@ xwl_window_post_damage(struct xwl_window
wl_callback_add_listener(xwl_window->frame_callback, &frame_listener, xwl_window);
wl_surface_commit(xwl_window->surface);
- DamageEmpty(xwl_window->damage);
+ DamageEmpty(window_get_damage(xwl_window->window));
xorg_list_del(&xwl_window->link_damage);
}
@@ -962,6 +1044,8 @@ xwl_screen_init(ScreenPtr pScreen, int a
return FALSE;
if (!dixRegisterPrivateKey(&xwl_pixmap_private_key, PRIVATE_PIXMAP, 0))
return FALSE;
+ if (!dixRegisterPrivateKey(&xwl_damage_private_key, PRIVATE_WINDOW, 0))
+ return FALSE;
dixSetPrivate(&pScreen->devPrivates, &xwl_screen_private_key, xwl_screen);
xwl_screen->screen = pScreen;
@@ -1121,6 +1205,11 @@ xwl_screen_init(ScreenPtr pScreen, int a
xwl_screen->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = xwl_close_screen;
+ if (xwl_screen->rootless) {
+ xwl_screen->SetWindowPixmap = pScreen->SetWindowPixmap;
+ pScreen->SetWindowPixmap = xwl_set_window_pixmap;
+ }
+
pScreen->CursorWarpedTo = xwl_cursor_warped_to;
pScreen->CursorConfinedTo = xwl_cursor_confined_to;
Index: xorg-server-1.20.5/hw/xwayland/xwayland.h
===================================================================
--- xorg-server-1.20.5.orig/hw/xwayland/xwayland.h
+++ xorg-server-1.20.5/hw/xwayland/xwayland.h
@@ -133,6 +133,7 @@ struct xwl_screen {
UnrealizeWindowProcPtr UnrealizeWindow;
DestroyWindowProcPtr DestroyWindow;
XYToWindowProcPtr XYToWindow;
+ SetWindowPixmapProcPtr SetWindowPixmap;
struct xorg_list output_list;
struct xorg_list seat_list;
@@ -178,7 +179,6 @@ struct xwl_window {
struct wl_surface *surface;
struct wl_shell_surface *shell_surface;
WindowPtr window;
- DamagePtr damage;
struct xorg_list link_damage;
struct wl_callback *frame_callback;
Bool allow_commits;

View File

@ -28,10 +28,10 @@ Signed-off-by: Dave Airlie <airlied@gmail.com>
hw/xfree86/modes/xf86Crtc.c | 32 ++++++++++++++++++++++++++++++++
3 files changed, 47 insertions(+)
diff --git a/dix/main.c b/dix/main.c
index 273f30330..b85c81034 100644
--- a/dix/main.c
+++ b/dix/main.c
Index: xorg-server-1.20.5/dix/main.c
===================================================================
--- xorg-server-1.20.5.orig/dix/main.c
+++ xorg-server-1.20.5/dix/main.c
@@ -122,6 +122,8 @@ extern void Dispatch(void);
CallbackListPtr RootWindowFinalizeCallback = NULL;
@ -41,7 +41,7 @@ index 273f30330..b85c81034 100644
int
dix_main(int argc, char *argv[], char *envp[])
{
@@ -244,6 +246,8 @@ dix_main(int argc, char *argv[], char *envp[])
@@ -246,6 +248,8 @@ dix_main(int argc, char *argv[], char *e
for (i = 0; i < screenInfo.numScreens; i++)
InitRootWindow(screenInfo.screens[i]->root);
@ -50,11 +50,11 @@ index 273f30330..b85c81034 100644
InitCoreDevices();
InitInput(argc, argv);
InitAndStartDevices();
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index cc34a1952..766888b3e 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -73,6 +73,7 @@
Index: xorg-server-1.20.5/hw/xfree86/common/xf86Init.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/common/xf86Init.c
+++ xorg-server-1.20.5/hw/xfree86/common/xf86Init.c
@@ -76,6 +76,7 @@
#include "xf86DDC.h"
#include "xf86Xinput.h"
#include "xf86InPriv.h"
@ -62,7 +62,7 @@ index cc34a1952..766888b3e 100644
#include "picturestr.h"
#include "randrstr.h"
#include "glxvndabi.h"
@@ -264,6 +265,231 @@ AddVTAtoms(CallbackListPtr *pcbl, void *data, void *screen)
@@ -294,6 +295,231 @@ AddVTAtoms(CallbackListPtr *pcbl, void *
"Failed to register VT properties\n");
}
@ -294,7 +294,7 @@ index cc34a1952..766888b3e 100644
static Bool
xf86ScreenInit(ScreenPtr pScreen, int argc, char **argv)
{
@@ -703,6 +929,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
@@ -770,6 +996,8 @@ InitOutput(ScreenInfo * pScreenInfo, int
for (i = 0; i < xf86NumGPUScreens; i++)
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
@ -303,11 +303,11 @@ index cc34a1952..766888b3e 100644
xf86VGAarbiterWrapFunctions();
if (sigio_blocked)
input_unlock();
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index cef47da03..395ce9400 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -594,6 +594,8 @@ xf86platformAddGPUDevices(DriverPtr drvp)
Index: xorg-server-1.20.5/hw/xfree86/common/xf86platformBus.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/common/xf86platformBus.c
+++ xorg-server-1.20.5/hw/xfree86/common/xf86platformBus.c
@@ -594,6 +594,8 @@ xf86platformAddGPUDevices(DriverPtr drvp
return foundScreen;
}
@ -324,11 +324,11 @@ index cef47da03..395ce9400 100644
RRResourcesChanged(xf86Screens[0]->pScreen);
RRTellChanged(xf86Screens[0]->pScreen);
diff --git a/include/dix.h b/include/dix.h
index 476559842..7372ba0d5 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -597,6 +597,8 @@ typedef struct {
Index: xorg-server-1.20.5/include/dix.h
===================================================================
--- xorg-server-1.20.5.orig/include/dix.h
+++ xorg-server-1.20.5/include/dix.h
@@ -599,6 +599,8 @@ typedef struct {
extern _X_EXPORT CallbackListPtr RootWindowFinalizeCallback;

View File

@ -16,11 +16,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
hw/xfree86/modes/xf86RandR12.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index eae7016..9f444dd 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -681,6 +681,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
Index: xorg-server-1.20.5/hw/xfree86/modes/xf86RandR12.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/modes/xf86RandR12.c
+++ xorg-server-1.20.5/hw/xfree86/modes/xf86RandR12.c
@@ -685,6 +685,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScre
WindowPtr pRoot = pScreen->root;
PixmapPtr pScrnPix;
Bool ret = FALSE;
@ -28,7 +28,7 @@ index eae7016..9f444dd 100644
int c;
if (randrp->virtualX == -1 || randrp->virtualY == -1) {
@@ -709,6 +710,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
@@ -713,6 +714,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScre
if (crtc->panningTrackingArea.y2 > crtc->panningTrackingArea.y1)
crtc->panningTrackingArea.y2 += height - pScreen->height;
xf86RandR13VerifyPanningArea(crtc, width, height);
@ -36,7 +36,7 @@ index eae7016..9f444dd 100644
xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY);
}
}
@@ -718,6 +720,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
@@ -722,6 +724,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScre
pScreen->height = pScrnPix->drawable.height = height;
randrp->mmWidth = pScreen->mmWidth = mmWidth;
randrp->mmHeight = pScreen->mmHeight = mmHeight;

View File

@ -24,10 +24,10 @@ Reviewed-by: Stefan Dirsch <sndirsch@suse.de>
os/auth.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++--
3 files changed, 141 insertions(+), 7 deletions(-)
Index: xorg-server-1.19.3/configure.ac
Index: xorg-server-1.20.5/configure.ac
===================================================================
--- xorg-server-1.19.3.orig/configure.ac
+++ xorg-server-1.19.3/configure.ac
--- xorg-server-1.20.5.orig/configure.ac
+++ xorg-server-1.20.5/configure.ac
@@ -134,7 +134,7 @@ AM_CONDITIONAL(SPECIAL_DTRACE_OBJECTS, [
AC_HEADER_DIRENT
AC_HEADER_STDC
@ -37,7 +37,7 @@ Index: xorg-server-1.19.3/configure.ac
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -226,7 +226,7 @@ AC_REPLACE_FUNCS([reallocarray strcasecm
@@ -166,7 +166,7 @@ AC_REPLACE_FUNCS([reallocarray strcasecm
AM_CONDITIONAL(POLL, [test "x$ac_cv_func_poll" = "xyes"])
AC_CHECK_LIB([bsd], [arc4random_buf])
@ -46,11 +46,11 @@ Index: xorg-server-1.19.3/configure.ac
AC_CHECK_DECLS([program_invocation_short_name], [], [], [[#include <errno.h>]])
Index: xorg-server-1.19.3/include/dix-config.h.in
Index: xorg-server-1.20.5/include/dix-config.h.in
===================================================================
--- xorg-server-1.19.3.orig/include/dix-config.h.in
+++ xorg-server-1.19.3/include/dix-config.h.in
@@ -167,6 +167,9 @@
--- xorg-server-1.20.5.orig/include/dix-config.h.in
+++ xorg-server-1.20.5/include/dix-config.h.in
@@ -155,6 +155,9 @@
/* Define to 1 if you have the `arc4random_buf' function. */
#undef HAVE_ARC4RANDOM_BUF
@ -60,7 +60,7 @@ Index: xorg-server-1.19.3/include/dix-config.h.in
/* Define to use libc SHA1 functions */
#undef HAVE_SHA1_IN_LIBC
@@ -244,6 +247,9 @@
@@ -232,6 +235,9 @@
/* Define to 1 if you have the <sys/utsname.h> header file. */
#undef HAVE_SYS_UTSNAME_H
@ -70,11 +70,11 @@ Index: xorg-server-1.19.3/include/dix-config.h.in
/* Define to 1 if you have the `timingsafe_memcmp' function. */
#undef HAVE_TIMINGSAFE_MEMCMP
Index: xorg-server-1.19.3/os/auth.c
Index: xorg-server-1.20.5/os/auth.c
===================================================================
--- xorg-server-1.19.3.orig/os/auth.c
+++ xorg-server-1.19.3/os/auth.c
@@ -48,6 +48,10 @@ from The Open Group.
--- xorg-server-1.20.5.orig/os/auth.c
+++ xorg-server-1.20.5/os/auth.c
@@ -49,6 +49,10 @@ from The Open Group.
#ifdef HAVE_LIBBSD
#include <bsd/stdlib.h> /* for arc4random_buf() */
#endif
@ -85,7 +85,7 @@ Index: xorg-server-1.19.3/os/auth.c
struct protocol {
unsigned short name_length;
@@ -304,16 +308,140 @@ GenerateAuthorization(unsigned name_length,
@@ -310,16 +314,140 @@ GenerateAuthorization(unsigned name_leng
#endif /* XCSECURITY */

View File

@ -25,11 +25,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
hw/xfree86/common/xf86platformBus.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 8b3a862..efa6d1a 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -622,6 +622,35 @@ void xf86platformPrimary(void)
Index: xorg-server-1.20.5/hw/xfree86/common/xf86platformBus.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/common/xf86platformBus.c
+++ xorg-server-1.20.5/hw/xfree86/common/xf86platformBus.c
@@ -744,6 +744,35 @@ void xf86platformPrimary(void)
xf86Msg(X_NONE, "\tfalling back to %s\n", primaryBus.id.plat->attribs->syspath);
}

View File

@ -21,11 +21,11 @@ provider is there.
randr/randr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/randr/randr.c b/randr/randr.c
index feb54bcc8..661f66da2 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -643,7 +643,9 @@ RRTellChanged(ScreenPtr pScreen)
Index: xorg-server-1.20.5/randr/randr.c
===================================================================
--- xorg-server-1.20.5.orig/randr/randr.c
+++ xorg-server-1.20.5/randr/randr.c
@@ -647,7 +647,9 @@ RRTellChanged(ScreenPtr pScreen)
xorg_list_for_each_entry(iter, &master->slave_list, slave_head) {
pSlaveScrPriv = rrGetScrPriv(iter);
@ -36,6 +36,3 @@ index feb54bcc8..661f66da2 100644
if (iter->is_output_slave) {
for (i = 0; i < pSlaveScrPriv->numOutputs; i++)
pSlaveScrPriv->outputs[i]->changed = FALSE;
--
2.13.6

View File

@ -16,11 +16,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
render/picture.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/render/picture.c b/render/picture.c
index 2908b76..74369de 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -548,12 +548,12 @@ PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual)
Index: xorg-server-1.20.5/render/picture.c
===================================================================
--- xorg-server-1.20.5.orig/render/picture.c
+++ xorg-server-1.20.5/render/picture.c
@@ -527,12 +527,12 @@ PictureMatchVisual(ScreenPtr pScreen, in
return format;
}
else {

View File

@ -12,11 +12,11 @@ the first address and then give up.
Even if this seems to be the wrong place to fix this it seems to be
easier than fixing all display servers.
Index: xorg-server-1.12.1/os/access.c
Index: xorg-server-1.20.5/os/access.c
===================================================================
--- xorg-server-1.12.1.orig/os/access.c
+++ xorg-server-1.12.1/os/access.c
@@ -714,7 +714,9 @@ DefineSelf(int fd)
--- xorg-server-1.20.5.orig/os/access.c
+++ xorg-server-1.20.5/os/access.c
@@ -827,7 +827,9 @@ DefineSelf(int fd)
/*
* ignore 'localhost' entries as they're not useful
@ -27,7 +27,7 @@ Index: xorg-server-1.12.1/os/access.c
*/
if (ifr->ifa_flags & IFF_LOOPBACK)
continue;
@@ -735,6 +737,14 @@ DefineSelf(int fd)
@@ -848,6 +850,14 @@ DefineSelf(int fd)
else if (family == FamilyInternet6 &&
IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
continue;

View File

@ -10,11 +10,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
hw/xfree86/xorg-wrapper.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index d930962..64a43c4 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -36,6 +36,8 @@
Index: xorg-server-1.20.5/hw/xfree86/xorg-wrapper.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/xorg-wrapper.c
+++ xorg-server-1.20.5/hw/xfree86/xorg-wrapper.c
@@ -35,6 +35,8 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
@ -23,7 +23,7 @@ index d930962..64a43c4 100644
#ifdef HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h>
#endif
@@ -252,6 +254,52 @@ int main(int argc, char *argv[])
@@ -255,6 +257,52 @@ int main(int argc, char *argv[])
if (needs_root_rights == 0 || (total_cards && kms_cards == total_cards)) {
gid_t realgid = getgid();
uid_t realuid = getuid();

View File

@ -10,11 +10,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
hw/xfree86/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 461e818..c0ce3b8 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -87,6 +87,7 @@ if SUID_WRAPPER
Index: xorg-server-1.20.5/hw/xfree86/Makefile.am
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/Makefile.am
+++ xorg-server-1.20.5/hw/xfree86/Makefile.am
@@ -92,6 +92,7 @@ if SUID_WRAPPER
wrapexecdir = $(SUID_WRAPPER_DIR)
wrapexec_PROGRAMS = Xorg.wrap
Xorg_wrap_SOURCES = xorg-wrapper.c

View File

@ -11,11 +11,11 @@ Signed-off-by: Adam Jackson <ajax@redhat.com>
include/xorg-server.h.in | 1 +
2 files changed, 2 insertions(+)
Index: a/include/dix-config.h.in
Index: xorg-server-1.20.5/include/dix-config.h.in
===================================================================
--- a.orig/include/dix-config.h.in
+++ a/include/dix-config.h.in
@@ -499,6 +499,7 @@
--- xorg-server-1.20.5.orig/include/dix-config.h.in
+++ xorg-server-1.20.5/include/dix-config.h.in
@@ -487,6 +487,7 @@
/* byte order */
#undef X_BYTE_ORDER
@ -23,11 +23,11 @@ Index: a/include/dix-config.h.in
/* Listen on TCP socket */
#undef LISTEN_TCP
Index: a/include/xorg-server.h.in
Index: xorg-server-1.20.5/include/xorg-server.h.in
===================================================================
--- a.orig/include/xorg-server.h.in
+++ a/include/xorg-server.h.in
@@ -233,5 +233,6 @@
--- xorg-server-1.20.5.orig/include/xorg-server.h.in
+++ xorg-server-1.20.5/include/xorg-server.h.in
@@ -218,5 +218,6 @@
/* byte order */
#undef X_BYTE_ORDER

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Sep 16 15:00:32 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
- Add U_xwayland-Separate-DamagePtr-into-separate-window-data.patch
and U_xwayland-Allow-passing-a-fd.patch: Needed for gnome 3.34
new and experimental xwayland on demand feature.
- Rebase patches with quilt.
-------------------------------------------------------------------
Fri Aug 30 09:38:25 UTC 2019 - Stefan Dirsch <sndirsch@suse.com>

View File

@ -246,6 +246,10 @@ Patch1502: U_dix-window-Use-ConfigureWindow-instead-of-MoveWindow.patch
Patch1503: u_xfree86-Do-not-claim-pci-slots-if-fb-slot-is-already.patch
Patch1504: U_xwayland-Separate-DamagePtr-into-separate-window-data.patch
Patch1505: U_xwayland-Allow-passing-a-fd.patch
# required for NVIDIA's PRIME render offload support
Patch1601: 0001-xsync-Add-resource-inside-of-SyncCreate-export-SyncC.patch
Patch1602: 0002-GLX-Add-a-per-client-vendor-mapping.patch
@ -398,6 +402,10 @@ sh %{SOURCE92} --verify . %{SOURCE91}
%patch1503 -p1
%patch1504 -p1
%patch1505 -p1
# required for NVIDIA's PRIME render offload support
%patch1601 -p1
%patch1602 -p1