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
This commit is contained in:
parent
3983befa64
commit
9e2b2587e8
@ -27,11 +27,11 @@ index 38fb0c1..46e74bf 100644
|
||||
-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) $(WAYLAND_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \
|
||||
+ $(DRI2_SUBDIR) $(WAYLAND_SUBDIR) . vbe i2c dixmods \
|
||||
fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man
|
||||
- $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \
|
||||
+ $(DRI2_SUBDIR) . vbe i2c dixmods \
|
||||
fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \
|
||||
$(GLAMOR_EGL_SUBDIR)
|
||||
|
||||
DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
From 17830918f1bebf3696c6660f602de84d3efeb1ac Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 17 Apr 2014 15:50:44 +0200
|
||||
Subject: [PATCH] Fedora hack: Make the suid-root wrapper always start the
|
||||
server with root rights
|
||||
|
||||
Do NOT upstream.
|
||||
|
||||
Since most display managers are not ready yet to start Xorg in way which will
|
||||
keep it working without root-rights, see:
|
||||
https://fedoraproject.org/wiki/Changes/XorgWithoutRootRights
|
||||
|
||||
Just keep starting X as root for now, but do it through the wrapper. This
|
||||
allows people who want to test Xorg without root rights to create a
|
||||
/etc/X11/Xwrapper.config file with:
|
||||
|
||||
needs_root_rights = auto
|
||||
|
||||
In there to test XorgWithoutRootRights without breaking people's setups due
|
||||
to non ready display-managers.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
hw/xfree86/xorg-wrapper.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
|
||||
index 90c8c11..539bfe4 100644
|
||||
--- a/hw/xfree86/xorg-wrapper.c
|
||||
+++ b/hw/xfree86/xorg-wrapper.c
|
||||
@@ -153,7 +153,7 @@ int main(int argc, char *argv[])
|
||||
int kms_cards = 0;
|
||||
int total_cards = 0;
|
||||
int allowed = CONSOLE_ONLY;
|
||||
- int needs_root_rights = -1;
|
||||
+ int needs_root_rights = 1;
|
||||
|
||||
parse_config(&allowed, &needs_root_rights);
|
||||
|
||||
--
|
||||
1.9.0
|
||||
|
@ -1,86 +0,0 @@
|
||||
From 2377c922b8b639d3c511ca92a6ddd2db921b3105 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed, 26 Feb 2014 07:54:56 +1000
|
||||
Subject: [PATCH] config: search for PnPID on all parents (#75513)
|
||||
|
||||
The PnPID for a device may not be on the immediate parent, so search up the
|
||||
device tree until we find one.
|
||||
|
||||
X.Org Bug 75513 <http://bugs.freedesktop.org/show_bug.cgi?id=75513>
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
---
|
||||
config/hal.c | 16 +++++++++++++---
|
||||
config/udev.c | 15 +++++++++++----
|
||||
2 files changed, 24 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/config/hal.c b/config/hal.c
|
||||
index 2ead556..d8e8db7 100644
|
||||
--- a/config/hal.c
|
||||
+++ b/config/hal.c
|
||||
@@ -184,8 +184,7 @@ device_added(LibHalContext * hal_ctx, const char *udi)
|
||||
parent = get_prop_string(hal_ctx, udi, "info.parent");
|
||||
if (parent) {
|
||||
int usb_vendor, usb_product;
|
||||
-
|
||||
- attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id");
|
||||
+ char *old_parent;
|
||||
|
||||
/* construct USB ID in lowercase - "0000:ffff" */
|
||||
usb_vendor = libhal_device_get_property_int(hal_ctx, parent,
|
||||
@@ -203,7 +202,18 @@ device_added(LibHalContext * hal_ctx, const char *udi)
|
||||
== -1)
|
||||
attrs.usb_id = NULL;
|
||||
|
||||
- free(parent);
|
||||
+ attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id");
|
||||
+ old_parent = parent;
|
||||
+
|
||||
+ while (!attrs.pnp_id &&
|
||||
+ (parent = get_prop_string(hal_ctx, parent, "info.parent"))) {
|
||||
+ attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id");
|
||||
+
|
||||
+ free(old_parent);
|
||||
+ old_parent = parent;
|
||||
+ }
|
||||
+
|
||||
+ free(old_parent);
|
||||
}
|
||||
|
||||
input_options = input_option_new(NULL, "_source", "server/hal");
|
||||
diff --git a/config/udev.c b/config/udev.c
|
||||
index b55b78e..bcafbd9 100644
|
||||
--- a/config/udev.c
|
||||
+++ b/config/udev.c
|
||||
@@ -130,10 +130,6 @@ device_added(struct udev_device *udev_device)
|
||||
LOG_PROPERTY(ppath, "NAME", name);
|
||||
}
|
||||
|
||||
- if (pnp_id)
|
||||
- attrs.pnp_id = strdup(pnp_id);
|
||||
- LOG_SYSATTR(ppath, "id", pnp_id);
|
||||
-
|
||||
/* construct USB ID in lowercase hex - "0000:ffff" */
|
||||
if (product &&
|
||||
sscanf(product, "%*x/%4x/%4x/%*x", &usb_vendor, &usb_model) == 2) {
|
||||
@@ -143,6 +139,17 @@ device_added(struct udev_device *udev_device)
|
||||
else
|
||||
LOG_PROPERTY(ppath, "PRODUCT", product);
|
||||
}
|
||||
+
|
||||
+ while (!pnp_id && (parent = udev_device_get_parent(parent))) {
|
||||
+ pnp_id = udev_device_get_sysattr_value(parent, "id");
|
||||
+ if (!pnp_id)
|
||||
+ continue;
|
||||
+
|
||||
+ attrs.pnp_id = strdup(pnp_id);
|
||||
+ ppath = udev_device_get_devnode(parent);
|
||||
+ LOG_SYSATTR(ppath, "id", pnp_id);
|
||||
+ }
|
||||
+
|
||||
}
|
||||
if (!name)
|
||||
name = "(unnamed)";
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,28 +0,0 @@
|
||||
From 53271cd4c761e884dd9060912e000b07bbaf0c3a Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Thu, 12 Dec 2013 10:57:40 -0500
|
||||
Subject: [PATCH] configure: Fix a typo near dri3/shmfence detection
|
||||
|
||||
" is not the mate of ].
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8bedd35..3f2c2d0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1218,7 +1218,7 @@ case "$DRI3,$HAVE_XSHMFENCE" in
|
||||
yes,yes | auto,yes)
|
||||
;;
|
||||
yes,no)
|
||||
- AC_MSG_ERROR("DRI3 requested, but xshmfence not found.])
|
||||
+ AC_MSG_ERROR([DRI3 requested, but xshmfence not found.])
|
||||
DRI3=no
|
||||
;;
|
||||
no,*)
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,125 +0,0 @@
|
||||
From bd6c61de441087b808a45ff3fea4fe5a31455c5c Mon Sep 17 00:00:00 2001
|
||||
From: Robert Bragg <robert@linux.intel.com>
|
||||
Date: Thu, 12 Jan 2012 18:16:08 +0000
|
||||
Subject: [PATCH 01/38] dbe: Cleanup in CloseScreen hook not ext CloseDown
|
||||
|
||||
Instead of registering an extension CloseDownProc when adding the dbe
|
||||
extension this patch hooks into pScreen->CloseScreen so that the chain
|
||||
of pScreen->DestroyWindow hooks remains valid until all windows have
|
||||
been destroyed. Previously it was possible for DbeResetProc to be called
|
||||
before the root window had been destroyed and the unwrapping of
|
||||
pScreen->DestroyWindow would clobber the chain of callbacks.
|
||||
|
||||
This is needed for xwayland to be able to know when the root window is
|
||||
destroyed so it can unredirect root sub-windows.
|
||||
---
|
||||
dbe/dbe.c | 41 +++++++++++++++++++++--------------------
|
||||
dbe/dbestruct.h | 1 +
|
||||
2 files changed, 22 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dbe/dbe.c b/dbe/dbe.c
|
||||
index 5524615..8d8bfb9 100644
|
||||
--- a/dbe/dbe.c
|
||||
+++ b/dbe/dbe.c
|
||||
@@ -288,8 +288,8 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
|
||||
|
||||
/* malloc/realloc a new array and initialize all elements to 0. */
|
||||
pDbeWindowPriv->IDs = (XID *) realloc(pIDs,
|
||||
- (pDbeWindowPriv->
|
||||
- maxAvailableIDs +
|
||||
+ (pDbeWindowPriv->maxAvailableIDs
|
||||
+ +
|
||||
DBE_INCR_MAX_IDS) *
|
||||
sizeof(XID));
|
||||
if (!pDbeWindowPriv->IDs) {
|
||||
@@ -464,7 +464,7 @@ ProcDbeSwapBuffers(ClientPtr client)
|
||||
return BadAlloc;
|
||||
|
||||
/* Get to the swap info appended to the end of the request. */
|
||||
- dbeSwapInfo = (xDbeSwapInfo *) &stuff[1];
|
||||
+ dbeSwapInfo = (xDbeSwapInfo *) & stuff[1];
|
||||
|
||||
/* Allocate array to record swap information. */
|
||||
swapInfo = (DbeSwapInfoPtr) malloc(nStuff * sizeof(DbeSwapInfoRec));
|
||||
@@ -1230,7 +1230,7 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id)
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
- * DBE DIX Procedure: DbeResetProc
|
||||
+ * DBE DIX Procedure: DbeCloseScreen
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
@@ -1239,25 +1239,23 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id)
|
||||
* other tasks related to shutting down the extension.
|
||||
*
|
||||
*****************************************************************************/
|
||||
-static void
|
||||
-DbeResetProc(ExtensionEntry * extEntry)
|
||||
+static Bool
|
||||
+DbeCloseScreen(ScreenPtr pScreen)
|
||||
{
|
||||
- int i;
|
||||
- ScreenPtr pScreen;
|
||||
- DbeScreenPrivPtr pDbeScreenPriv;
|
||||
+ DbeScreenPrivPtr pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
|
||||
|
||||
- for (i = 0; i < screenInfo.numScreens; i++) {
|
||||
- pScreen = screenInfo.screens[i];
|
||||
- pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
|
||||
+ if (pDbeScreenPriv) {
|
||||
+ /* Unwrap DestroyWindow, which was wrapped in DbeExtensionInit(). */
|
||||
+ pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow;
|
||||
|
||||
- if (pDbeScreenPriv) {
|
||||
- /* Unwrap DestroyWindow, which was wrapped in DbeExtensionInit(). */
|
||||
- pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow;
|
||||
- pScreen->PositionWindow = pDbeScreenPriv->PositionWindow;
|
||||
- free(pDbeScreenPriv);
|
||||
- }
|
||||
+ /* Unwrap CloseScreen, which was wrapped in DbeExtensionInit(). */
|
||||
+ pScreen->CloseScreen = pDbeScreenPriv->CloseScreen;
|
||||
+
|
||||
+ free(pDbeScreenPriv);
|
||||
}
|
||||
-} /* DbeResetProc() */
|
||||
+
|
||||
+ return (*pScreen->CloseScreen) (pScreen);
|
||||
+} /* DbeCloseScreen */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
@@ -1427,6 +1425,9 @@ DbeExtensionInit(void)
|
||||
|
||||
pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
||||
pScreen->DestroyWindow = DbeDestroyWindow;
|
||||
+
|
||||
+ pDbeScreenPriv->CloseScreen = pScreen->CloseScreen;
|
||||
+ pScreen->CloseScreen = DbeCloseScreen;
|
||||
}
|
||||
else {
|
||||
/* DDX initialization failed. Stub the screen. */
|
||||
@@ -1454,7 +1455,7 @@ DbeExtensionInit(void)
|
||||
/* Now add the extension. */
|
||||
extEntry = AddExtension(DBE_PROTOCOL_NAME, DbeNumberEvents,
|
||||
DbeNumberErrors, ProcDbeDispatch, SProcDbeDispatch,
|
||||
- DbeResetProc, StandardMinorOpcode);
|
||||
+ NULL, StandardMinorOpcode);
|
||||
|
||||
dbeErrorBase = extEntry->errorBase;
|
||||
SetResourceTypeErrorValue(dbeWindowPrivResType,
|
||||
diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h
|
||||
index 2002066..7733d0e 100644
|
||||
--- a/dbe/dbestruct.h
|
||||
+++ b/dbe/dbestruct.h
|
||||
@@ -176,6 +176,7 @@ typedef struct _DbeScreenPrivRec {
|
||||
*/
|
||||
PositionWindowProcPtr PositionWindow;
|
||||
DestroyWindowProcPtr DestroyWindow;
|
||||
+ CloseScreenProcPtr CloseScreen;
|
||||
|
||||
/* Per-screen DIX routines */
|
||||
Bool (*SetupBackgroundPainter) (WindowPtr /*pWin */ ,
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 554814642e7c927d0c10cdc8a33067c076b159ed Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Fri, 24 Jan 2014 18:16:54 +1000
|
||||
Subject: [PATCH 1/3] dix: fix button state check before changing a button
|
||||
mapping
|
||||
|
||||
dev->button->down is a bitmask, not a normal array. Use the helper function to
|
||||
check, we technically allow the mapping to change after the physical button
|
||||
has been pressed (but not yet processed yet), so only check BUTTON_PROCESSED.
|
||||
|
||||
From XSetPointerMapping(3):
|
||||
"If any of the buttons to be altered are logically in the down state,
|
||||
XSetPointerMapping returns MappingBusy, and the mapping is not changed."
|
||||
|
||||
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
---
|
||||
dix/inpututils.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dix/inpututils.c b/dix/inpututils.c
|
||||
index 3e1d75f..0cbb02b 100644
|
||||
--- a/dix/inpututils.c
|
||||
+++ b/dix/inpututils.c
|
||||
@@ -60,7 +60,8 @@ check_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, CARD32 *errval_out,
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
- if (dev->button->map[i + 1] != map[i] && dev->button->down[i + 1])
|
||||
+ if (dev->button->map[i + 1] != map[i] &&
|
||||
+ button_is_down(dev, i + 1, BUTTON_PROCESSED))
|
||||
return MappingBusy;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,47 +0,0 @@
|
||||
From abdbfba12e439d6c27156b1f4a773d68337e30c0 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Fri, 8 Nov 2013 09:44:24 -0500
|
||||
Subject: [PATCH] mustard: Restore XkbCopyDeviceKeymap
|
||||
|
||||
xwayland series takes this out, tigervnc 1.2.80 needs it
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
include/xkbsrv.h | 3 +++
|
||||
xkb/xkbUtils.c | 6 ++++++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
|
||||
index 6a2e96e..d5a4eb6 100644
|
||||
--- a/include/xkbsrv.h
|
||||
+++ b/include/xkbsrv.h
|
||||
@@ -812,6 +812,9 @@ extern _X_EXPORT void XkbSendNewKeyboardNotify(DeviceIntPtr /* kbd */ ,
|
||||
extern Bool XkbCopyKeymap(XkbDescPtr /* dst */ ,
|
||||
XkbDescPtr /* src */ );
|
||||
|
||||
+extern _X_EXPORT Bool XkbCopyDeviceKeymap(DeviceIntPtr /* dst */,
|
||||
+ DeviceIntPtr /* src */);
|
||||
+
|
||||
extern _X_EXPORT Bool XkbDeviceApplyKeymap(DeviceIntPtr /* dst */ ,
|
||||
XkbDescPtr /* src */ );
|
||||
|
||||
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
|
||||
index 6cf6e79..c14a790 100644
|
||||
--- a/xkb/xkbUtils.c
|
||||
+++ b/xkb/xkbUtils.c
|
||||
@@ -2027,6 +2027,12 @@ XkbDeviceApplyKeymap(DeviceIntPtr dst, XkbDescPtr desc)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+Bool
|
||||
+XkbCopyDeviceKeymap(DeviceIntPtr dst, DeviceIntPtr src)
|
||||
+{
|
||||
+ return XkbDeviceApplyKeymap(dst, src->key->xkbInfo->desc);
|
||||
+}
|
||||
+
|
||||
int
|
||||
XkbGetEffectiveGroup(XkbSrvInfoPtr xkbi, XkbStatePtr xkbState, CARD8 keycode)
|
||||
{
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,93 +0,0 @@
|
||||
From fe07ec19e212a68076560d243a2a935c54589068 Mon Sep 17 00:00:00 2001
|
||||
From: Keith Packard <keithp@keithp.com>
|
||||
Date: Tue, 10 Dec 2013 11:27:47 -0800
|
||||
Subject: [PATCH] present: recursively set window pixmaps on flip
|
||||
|
||||
Newly created windows inherit the pixmap of their parent, similarly,
|
||||
reparenting a tree inherits the pixmap of the destination tree.
|
||||
|
||||
Making present preserve the invariant that unredirected windows always
|
||||
have the same pixmap as their parent ensures that the above cases work
|
||||
correctly.
|
||||
|
||||
v2: name the recursive function to 'set_tree_pixmap' instead of 'set_window_pixmap'
|
||||
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
present/present.c | 44 +++++++++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 37 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/present/present.c b/present/present.c
|
||||
index ffbb0b3..50bd055 100644
|
||||
--- a/present/present.c
|
||||
+++ b/present/present.c
|
||||
@@ -312,6 +312,36 @@ present_flip_idle(ScreenPtr screen)
|
||||
}
|
||||
}
|
||||
|
||||
+struct pixmap_visit {
|
||||
+ PixmapPtr old;
|
||||
+ PixmapPtr new;
|
||||
+};
|
||||
+
|
||||
+static int
|
||||
+present_set_tree_pixmap_visit(WindowPtr window, pointer data)
|
||||
+{
|
||||
+ struct pixmap_visit *visit = data;
|
||||
+ ScreenPtr screen = window->drawable.pScreen;
|
||||
+
|
||||
+ if ((*screen->GetWindowPixmap)(window) != visit->old)
|
||||
+ return WT_DONTWALKCHILDREN;
|
||||
+ (*screen->SetWindowPixmap)(window, visit->new);
|
||||
+ return WT_WALKCHILDREN;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+present_set_tree_pixmap(WindowPtr window, PixmapPtr pixmap)
|
||||
+{
|
||||
+ struct pixmap_visit visit;
|
||||
+ ScreenPtr screen = window->drawable.pScreen;
|
||||
+
|
||||
+ visit.old = (*screen->GetWindowPixmap)(window);
|
||||
+ visit.new = pixmap;
|
||||
+ if (visit.old == visit.new)
|
||||
+ return;
|
||||
+ TraverseTree(window, present_set_tree_pixmap_visit, &visit);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
present_unflip(ScreenPtr screen)
|
||||
{
|
||||
@@ -321,10 +351,10 @@ present_unflip(ScreenPtr screen)
|
||||
assert (!screen_priv->flip_pending);
|
||||
|
||||
if (screen_priv->flip_window)
|
||||
- (*screen->SetWindowPixmap)(screen_priv->flip_window,
|
||||
- (*screen->GetScreenPixmap)(screen));
|
||||
+ present_set_tree_pixmap(screen_priv->flip_window,
|
||||
+ (*screen->GetScreenPixmap)(screen));
|
||||
|
||||
- (*screen->SetWindowPixmap)(screen->root, (*screen->GetScreenPixmap)(screen));
|
||||
+ present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen));
|
||||
|
||||
/* Update the screen pixmap with the current flip pixmap contents
|
||||
*/
|
||||
@@ -527,10 +557,10 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
|
||||
* 2) Set current flip window pixmap to the new pixmap
|
||||
*/
|
||||
if (screen_priv->flip_window && screen_priv->flip_window != window)
|
||||
- (*screen->SetWindowPixmap)(screen_priv->flip_window,
|
||||
- (*screen->GetScreenPixmap)(screen));
|
||||
- (*screen->SetWindowPixmap)(vblank->window, vblank->pixmap);
|
||||
- (*screen->SetWindowPixmap)(screen->root, vblank->pixmap);
|
||||
+ present_set_tree_pixmap(screen_priv->flip_window,
|
||||
+ (*screen->GetScreenPixmap)(screen));
|
||||
+ present_set_tree_pixmap(vblank->window, vblank->pixmap);
|
||||
+ present_set_tree_pixmap(screen->root, vblank->pixmap);
|
||||
|
||||
/* Report update region as damaged
|
||||
*/
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -19,15 +19,15 @@ index 2f76b62..40b01f0 100644
|
||||
@@ -474,7 +474,7 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
|
||||
|
||||
xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
|
||||
rrScrPriv(slave);
|
||||
- for (c = 0; c < pScrPriv->numCrtcs; c++)
|
||||
+ for (c = 0; c < pScrPriv->numCrtcs; c++) {
|
||||
if (pScrPriv->crtcs[c] == rr_crtc) {
|
||||
rrScrPrivPtr slave_priv = rrGetScrPriv(slave);
|
||||
- for (c = 0; c < slave_priv->numCrtcs; c++)
|
||||
+ for (c = 0; c < slave_priv->numCrtcs; c++) {
|
||||
if (slave_priv->crtcs[c] == rr_crtc) {
|
||||
newbox.x1 = x;
|
||||
newbox.x2 = x + w;
|
||||
@@ -489,8 +489,9 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
|
||||
newbox.y1 = pScrPriv->crtcs[c]->y;
|
||||
newbox.y2 = pScrPriv->crtcs[c]->y + pScrPriv->crtcs[c]->mode->mode.height;
|
||||
newbox.y1 = slave_priv->crtcs[c]->y;
|
||||
newbox.y2 = slave_priv->crtcs[c]->y + slave_priv->crtcs[c]->mode->mode.height;
|
||||
}
|
||||
- RegionInit(&new_crtc_region, &newbox, 1);
|
||||
- RegionUnion(&total_region, &total_region, &new_crtc_region);
|
||||
|
@ -1,60 +0,0 @@
|
||||
From 9354bdf25ce2c265f65c52610e0f21cd8267cc44 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 2 Oct 2013 12:38:45 -0400
|
||||
Subject: [PATCH] xfree86: Only look at wayland-capable drivers when -wayland
|
||||
given
|
||||
|
||||
There's no particularly good reason to support mixing wayland and
|
||||
non-wayland screens in the same Xorg instance, and it probably doesn't
|
||||
work correctly, so let's prevent people from injuring themselves.
|
||||
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Signed-off-by: Ray Strode <rstrode@redhat.com>
|
||||
---
|
||||
hw/xfree86/common/xf86Init.c | 20 ++++++++++----------
|
||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
|
||||
index a5a7daf..a40ed64 100644
|
||||
--- a/hw/xfree86/common/xf86Init.c
|
||||
+++ b/hw/xfree86/common/xf86Init.c
|
||||
@@ -550,26 +550,26 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||
xf86DriverList[i]->driverFunc(NULL,
|
||||
GET_REQUIRED_HW_INTERFACES,
|
||||
&flags);
|
||||
-
|
||||
- if (NEED_IO_ENABLED(flags))
|
||||
- want_hw_access = TRUE;
|
||||
-
|
||||
- if (!(flags & HW_SKIP_CONSOLE))
|
||||
- xorgHWOpenConsole = TRUE;
|
||||
-
|
||||
if (xorgWayland) {
|
||||
- if (flags != HW_WAYLAND) {
|
||||
+ if (!(flags & HW_WAYLAND)) {
|
||||
xf86DeleteDriver(i);
|
||||
continue;
|
||||
}
|
||||
|
||||
want_hw_access = FALSE;
|
||||
xorgHWOpenConsole = FALSE;
|
||||
- }
|
||||
+
|
||||
+ } else {
|
||||
+ if (NEED_IO_ENABLED(flags))
|
||||
+ want_hw_access = TRUE;
|
||||
+
|
||||
+ if (!(flags & HW_SKIP_CONSOLE))
|
||||
+ xorgHWOpenConsole = TRUE;
|
||||
+ }
|
||||
}
|
||||
|
||||
for (i = 0; i < xf86NumDrivers; i++) {
|
||||
- if (xf86DriverList[i] == NULL) {
|
||||
+ while (xf86DriverList[i] == NULL) {
|
||||
for (j = i; j < xf86NumDrivers; j++) {
|
||||
xf86DriverList[j] = xf86DriverList[j + 1];
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,59 +0,0 @@
|
||||
From a655c446880613e17c3b91e66a7f7ac125f62228 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Tue, 8 Oct 2013 13:54:27 -0400
|
||||
Subject: [PATCH] xwayland: Just send the bounding box of the damage
|
||||
|
||||
... instead of every rect. Most window updates are going to be CopyArea
|
||||
in from offscreen, with plenty of time to get back around to
|
||||
BlockHandler in between, so this is no change there. However for
|
||||
pathological apps like x11perf that draw complicated primitives directly
|
||||
to the window you can end up with massive numbers of damage rects, and
|
||||
you can run out of space in the write buffer and crash.
|
||||
|
||||
This obviously isn't a complete fix, and it would be nice to handle this
|
||||
more gracefully in the wayland client code, but this at least lets
|
||||
x11perf -all run to completion.
|
||||
|
||||
While we're in the area, rearrange attach to be before damage, not
|
||||
after, since the spec says that's the correct order.
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland.c | 14 +++++---------
|
||||
1 file changed, 5 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
|
||||
index c70a52d..c10a213 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland.c
|
||||
@@ -333,22 +333,18 @@ void xwl_screen_post_damage(struct xwl_screen *xwl_screen)
|
||||
struct xwl_window *xwl_window;
|
||||
RegionPtr region;
|
||||
BoxPtr box;
|
||||
- int count, i;
|
||||
|
||||
xorg_list_for_each_entry(xwl_window, &xwl_screen->damage_window_list,
|
||||
link_damage) {
|
||||
region = DamageRegion(xwl_window->damage);
|
||||
- count = RegionNumRects(region);
|
||||
- for (i = 0; i < count; i++) {
|
||||
- box = &RegionRects(region)[i];
|
||||
- wl_surface_damage(xwl_window->surface,
|
||||
- box->x1, box->y1,
|
||||
- box->x2 - box->x1,
|
||||
- box->y2 - box->y1);
|
||||
- }
|
||||
wl_surface_attach(xwl_window->surface,
|
||||
xwl_window->buffer,
|
||||
0, 0);
|
||||
+ box = ®ion->extents;
|
||||
+ wl_surface_damage(xwl_window->surface,
|
||||
+ box->x1, box->y1,
|
||||
+ box->x2 - box->x1,
|
||||
+ box->y2 - box->y1);
|
||||
wl_surface_commit(xwl_window->surface);
|
||||
DamageEmpty(xwl_window->damage);
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,190 +0,0 @@
|
||||
From 8470f377fc36772d885f4b614f4d42443c4b812b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Tue, 9 Apr 2013 16:54:55 -0400
|
||||
Subject: [PATCH 02/38] xkb: Add struct XkbCompContext
|
||||
|
||||
This commit adds a struct that contains most of the context for starting,
|
||||
running and cleaning up after xkbcomp.
|
||||
|
||||
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
||||
---
|
||||
xkb/ddxLoad.c | 76 +++++++++++++++++++++++++++++------------------------------
|
||||
1 file changed, 38 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
|
||||
index d462957..5da3a35 100644
|
||||
--- a/xkb/ddxLoad.c
|
||||
+++ b/xkb/ddxLoad.c
|
||||
@@ -90,14 +90,21 @@ OutputDirectory(char *outdir, size_t size)
|
||||
}
|
||||
}
|
||||
|
||||
+typedef struct XkbCompContext {
|
||||
+ char keymap[PATH_MAX];
|
||||
+ FILE *out;
|
||||
+ char *buf;
|
||||
+ char tmpname[PATH_MAX];
|
||||
+ const char *xkmfile;
|
||||
+} XkbCompContextRec, *XkbCompContextPtr;
|
||||
+
|
||||
static Bool
|
||||
XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
|
||||
XkbComponentNamesPtr names,
|
||||
unsigned want,
|
||||
- unsigned need, char *nameRtrn, int nameRtrnLen)
|
||||
+ unsigned need, XkbCompContextPtr ctx)
|
||||
{
|
||||
- FILE *out;
|
||||
- char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
|
||||
+ char xkm_output_dir[PATH_MAX];
|
||||
|
||||
const char *emptystring = "";
|
||||
char *xkbbasedirflag = NULL;
|
||||
@@ -105,22 +112,19 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
|
||||
const char *xkbbindirsep = emptystring;
|
||||
|
||||
#ifdef WIN32
|
||||
- /* WIN32 has no popen. The input must be stored in a file which is
|
||||
- used as input for xkbcomp. xkbcomp does not read from stdin. */
|
||||
- char tmpname[PATH_MAX];
|
||||
- const char *xkmfile = tmpname;
|
||||
+ ctx->xkmfile = ctx->tmpname;
|
||||
#else
|
||||
- const char *xkmfile = "-";
|
||||
+ ctx->xkmfile = "-";
|
||||
#endif
|
||||
|
||||
- snprintf(keymap, sizeof(keymap), "server-%s", display);
|
||||
+ snprintf(ctx->keymap, sizeof(ctx->keymap), "server-%s", display);
|
||||
|
||||
OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
|
||||
|
||||
#ifdef WIN32
|
||||
- strcpy(tmpname, Win32TempDir());
|
||||
- strcat(tmpname, "\\xkb_XXXXXX");
|
||||
- (void) mktemp(tmpname);
|
||||
+ strcpy(ctx->tmpname, Win32TempDir());
|
||||
+ strcat(ctx->tmpname, "\\xkb_XXXXXX");
|
||||
+ (void) mktemp(ctx->tmpname);
|
||||
#endif
|
||||
|
||||
if (XkbBaseDirectory != NULL) {
|
||||
@@ -139,73 +143,69 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
|
||||
}
|
||||
}
|
||||
|
||||
- if (asprintf(&buf,
|
||||
+ if (asprintf(&ctx->buf,
|
||||
"\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
|
||||
"-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
|
||||
xkbbindir, xkbbindirsep,
|
||||
((xkbDebugFlags < 2) ? 1 :
|
||||
((xkbDebugFlags > 10) ? 10 : (int) xkbDebugFlags)),
|
||||
- xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
|
||||
+ xkbbasedirflag ? xkbbasedirflag : "", ctx->xkmfile,
|
||||
PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
|
||||
- xkm_output_dir, keymap) == -1)
|
||||
- buf = NULL;
|
||||
+ xkm_output_dir, ctx->keymap) == -1)
|
||||
+ ctx->buf = NULL;
|
||||
|
||||
free(xkbbasedirflag);
|
||||
|
||||
- if (!buf) {
|
||||
+ if (!ctx->buf) {
|
||||
LogMessage(X_ERROR,
|
||||
"XKB: Could not invoke xkbcomp: not enough memory\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
- out = Popen(buf, "w");
|
||||
+ ctx->out = Popen(ctx->buf, "w");
|
||||
#else
|
||||
- out = fopen(tmpname, "w");
|
||||
+ ctx->out = fopen(ctx->tmpname, "w");
|
||||
#endif
|
||||
|
||||
- if (out != NULL) {
|
||||
+ if (ctx->out != NULL) {
|
||||
#ifdef DEBUG
|
||||
if (xkbDebugFlags) {
|
||||
ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
|
||||
XkbWriteXKBKeymapForNames(stderr, names, xkb, want, need);
|
||||
}
|
||||
#endif
|
||||
- XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
|
||||
+ XkbWriteXKBKeymapForNames(ctx->out, names, xkb, want, need);
|
||||
#ifndef WIN32
|
||||
- if (Pclose(out) == 0)
|
||||
+ if (Pclose(ctx->out) == 0)
|
||||
#else
|
||||
- if (fclose(out) == 0 && System(buf) >= 0)
|
||||
+ if (fclose(ctx->out) == 0 && System(ctx->buf) >= 0)
|
||||
#endif
|
||||
{
|
||||
if (xkbDebugFlags)
|
||||
- DebugF("[xkb] xkb executes: %s\n", buf);
|
||||
- if (nameRtrn) {
|
||||
- strlcpy(nameRtrn, keymap, nameRtrnLen);
|
||||
- }
|
||||
- free(buf);
|
||||
+ DebugF("[xkb] xkb executes: %s\n", ctx->buf);
|
||||
+ free(ctx->buf);
|
||||
#ifdef WIN32
|
||||
- unlink(tmpname);
|
||||
+ unlink(ctx->tmpname);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
|
||||
+ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", ctx->keymap);
|
||||
#ifdef WIN32
|
||||
/* remove the temporary file */
|
||||
- unlink(tmpname);
|
||||
+ unlink(ctx->tmpname);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#ifndef WIN32
|
||||
LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp\n");
|
||||
#else
|
||||
- LogMessage(X_ERROR, "Could not open file %s\n", tmpname);
|
||||
+ LogMessage(X_ERROR, "Could not open file %s\n", ctx->tmpname);
|
||||
#endif
|
||||
}
|
||||
- if (nameRtrn)
|
||||
- nameRtrn[0] = '\0';
|
||||
- free(buf);
|
||||
+ ctx->keymap[0] = '\0';
|
||||
+ free(ctx->buf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -256,6 +256,7 @@ XkbDDXLoadKeymapByNames(DeviceIntPtr keybd,
|
||||
FILE *file;
|
||||
char fileName[PATH_MAX];
|
||||
unsigned missing;
|
||||
+ XkbCompContextRec ctx;
|
||||
|
||||
*xkbRtrn = NULL;
|
||||
if ((keybd == NULL) || (keybd->key == NULL) ||
|
||||
@@ -270,12 +271,11 @@ XkbDDXLoadKeymapByNames(DeviceIntPtr keybd,
|
||||
keybd->name ? keybd->name : "(unnamed keyboard)");
|
||||
return 0;
|
||||
}
|
||||
- else if (!XkbDDXCompileKeymapByNames(xkb, names, want, need,
|
||||
- nameRtrn, nameRtrnLen)) {
|
||||
+ else if (!XkbDDXCompileKeymapByNames(xkb, names, want, need, &ctx)) {
|
||||
LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n");
|
||||
return 0;
|
||||
}
|
||||
- file = XkbDDXOpenConfigFile(nameRtrn, fileName, PATH_MAX);
|
||||
+ file = XkbDDXOpenConfigFile(ctx.keymap, fileName, PATH_MAX);
|
||||
if (file == NULL) {
|
||||
LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",
|
||||
fileName);
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,81 +0,0 @@
|
||||
From 7d08561178ab9384791a944bdb5797cf2ea14e1b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Tue, 9 Apr 2013 17:11:03 -0400
|
||||
Subject: [PATCH 03/38] xkb: Split out code to start and finish xkbcomp
|
||||
|
||||
Using the context struct from previous commit, we can now split out
|
||||
code to start xkbcomp and to finish and clean up after it.
|
||||
|
||||
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
||||
---
|
||||
xkb/ddxLoad.c | 39 ++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 28 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
|
||||
index 5da3a35..001ff46 100644
|
||||
--- a/xkb/ddxLoad.c
|
||||
+++ b/xkb/ddxLoad.c
|
||||
@@ -99,10 +99,7 @@ typedef struct XkbCompContext {
|
||||
} XkbCompContextRec, *XkbCompContextPtr;
|
||||
|
||||
static Bool
|
||||
-XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
|
||||
- XkbComponentNamesPtr names,
|
||||
- unsigned want,
|
||||
- unsigned need, XkbCompContextPtr ctx)
|
||||
+StartXkbComp(XkbCompContextPtr ctx)
|
||||
{
|
||||
char xkm_output_dir[PATH_MAX];
|
||||
|
||||
@@ -168,14 +165,15 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
|
||||
ctx->out = fopen(ctx->tmpname, "w");
|
||||
#endif
|
||||
|
||||
+ return ctx->out != NULL;
|
||||
+}
|
||||
+
|
||||
+static Bool
|
||||
+FinishXkbComp(XkbCompContextPtr ctx)
|
||||
+{
|
||||
+ if (!ctx->buf)
|
||||
+ return FALSE;
|
||||
if (ctx->out != NULL) {
|
||||
-#ifdef DEBUG
|
||||
- if (xkbDebugFlags) {
|
||||
- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
|
||||
- XkbWriteXKBKeymapForNames(stderr, names, xkb, want, need);
|
||||
- }
|
||||
-#endif
|
||||
- XkbWriteXKBKeymapForNames(ctx->out, names, xkb, want, need);
|
||||
#ifndef WIN32
|
||||
if (Pclose(ctx->out) == 0)
|
||||
#else
|
||||
@@ -209,6 +207,25 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+static Bool
|
||||
+XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
|
||||
+ XkbComponentNamesPtr names,
|
||||
+ unsigned want,
|
||||
+ unsigned need, XkbCompContextPtr ctx)
|
||||
+{
|
||||
+ if (StartXkbComp(ctx)) {
|
||||
+#ifdef DEBUG
|
||||
+ if (xkbDebugFlags) {
|
||||
+ ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
|
||||
+ XkbWriteXKBKeymapForNames(stderr, names, xkb, want, need);
|
||||
+ }
|
||||
+#endif
|
||||
+ XkbWriteXKBKeymapForNames(ctx->out, names, xkb, want, need);
|
||||
+ }
|
||||
+
|
||||
+ return FinishXkbComp(ctx);
|
||||
+}
|
||||
+
|
||||
static FILE *
|
||||
XkbDDXOpenConfigFile(char *mapName, char *fileNameRtrn, int fileNameRtrnLen)
|
||||
{
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,319 +0,0 @@
|
||||
From 927e9c1b26b618a20d590062d346b9a53b120d1f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Tue, 9 Apr 2013 17:45:08 -0400
|
||||
Subject: [PATCH 04/38] xkb: Add XkbCompileKeymapFromString()
|
||||
|
||||
This new function compiles a keymap from an in-memory string. We use it
|
||||
to add a new keyooard device init function,
|
||||
InitKeyboardDeviceStructFromString(), which inits a keyboard device with
|
||||
a keymap specified as a string instead of a rmlvo set.
|
||||
|
||||
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
||||
---
|
||||
include/input.h | 6 +++
|
||||
include/xkbsrv.h | 4 ++
|
||||
xkb/ddxLoad.c | 129 ++++++++++++++++++++++++++++++++++++++++++-------------
|
||||
xkb/xkbInit.c | 44 +++++++++++++++----
|
||||
4 files changed, 144 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/include/input.h b/include/input.h
|
||||
index 2d5e531..b1cc3ff 100644
|
||||
--- a/include/input.h
|
||||
+++ b/include/input.h
|
||||
@@ -385,6 +385,12 @@ extern _X_EXPORT Bool InitKeyboardDeviceStruct(DeviceIntPtr /*device */ ,
|
||||
KbdCtrlProcPtr /*controlProc */
|
||||
);
|
||||
|
||||
+extern _X_EXPORT Bool InitKeyboardDeviceStructFromString(DeviceIntPtr dev,
|
||||
+ const char *keymap,
|
||||
+ int keymap_length,
|
||||
+ BellProcPtr bell_func,
|
||||
+ KbdCtrlProcPtr ctrl_func);
|
||||
+
|
||||
extern int ApplyPointerMapping(DeviceIntPtr /* pDev */ ,
|
||||
CARD8 * /* map */ ,
|
||||
int /* len */ ,
|
||||
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
|
||||
index 346ebcc..bef98ef 100644
|
||||
--- a/include/xkbsrv.h
|
||||
+++ b/include/xkbsrv.h
|
||||
@@ -861,4 +861,8 @@ extern _X_EXPORT XkbDescPtr XkbCompileKeymap(DeviceIntPtr /* dev */ ,
|
||||
XkbRMLVOSet * /* rmlvo */
|
||||
);
|
||||
|
||||
+extern _X_EXPORT XkbDescPtr XkbCompileKeymapFromString(DeviceIntPtr dev,
|
||||
+ const char *keymap,
|
||||
+ int keymap_length);
|
||||
+
|
||||
#endif /* _XKBSRV_H_ */
|
||||
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
|
||||
index 001ff46..7a7cf1e 100644
|
||||
--- a/xkb/ddxLoad.c
|
||||
+++ b/xkb/ddxLoad.c
|
||||
@@ -262,6 +262,35 @@ XkbDDXOpenConfigFile(char *mapName, char *fileNameRtrn, int fileNameRtrnLen)
|
||||
return file;
|
||||
}
|
||||
|
||||
+static unsigned
|
||||
+LoadXKM(unsigned want, unsigned need, XkbCompContextPtr ctx, XkbDescPtr *xkbRtrn)
|
||||
+{
|
||||
+ FILE *file;
|
||||
+ char fileName[PATH_MAX];
|
||||
+ unsigned missing;
|
||||
+
|
||||
+ file = XkbDDXOpenConfigFile(ctx->keymap, fileName, PATH_MAX);
|
||||
+ if (file == NULL) {
|
||||
+ LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",
|
||||
+ fileName);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ missing = XkmReadFile(file, need, want, xkbRtrn);
|
||||
+ if (*xkbRtrn == NULL) {
|
||||
+ LogMessage(X_ERROR, "Error loading keymap %s\n", fileName);
|
||||
+ fclose(file);
|
||||
+ (void) unlink(fileName);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ else {
|
||||
+ DebugF("Loaded XKB keymap %s, defined=0x%x\n", fileName,
|
||||
+ (*xkbRtrn)->defined);
|
||||
+ }
|
||||
+ fclose(file);
|
||||
+ (void) unlink(fileName);
|
||||
+ return (need | want) & (~missing);
|
||||
+}
|
||||
+
|
||||
unsigned
|
||||
XkbDDXLoadKeymapByNames(DeviceIntPtr keybd,
|
||||
XkbComponentNamesPtr names,
|
||||
@@ -270,9 +299,6 @@ XkbDDXLoadKeymapByNames(DeviceIntPtr keybd,
|
||||
XkbDescPtr *xkbRtrn, char *nameRtrn, int nameRtrnLen)
|
||||
{
|
||||
XkbDescPtr xkb;
|
||||
- FILE *file;
|
||||
- char fileName[PATH_MAX];
|
||||
- unsigned missing;
|
||||
XkbCompContextRec ctx;
|
||||
|
||||
*xkbRtrn = NULL;
|
||||
@@ -292,26 +318,30 @@ XkbDDXLoadKeymapByNames(DeviceIntPtr keybd,
|
||||
LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n");
|
||||
return 0;
|
||||
}
|
||||
- file = XkbDDXOpenConfigFile(ctx.keymap, fileName, PATH_MAX);
|
||||
- if (file == NULL) {
|
||||
- LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",
|
||||
- fileName);
|
||||
- return 0;
|
||||
- }
|
||||
- missing = XkmReadFile(file, need, want, xkbRtrn);
|
||||
- if (*xkbRtrn == NULL) {
|
||||
- LogMessage(X_ERROR, "Error loading keymap %s\n", fileName);
|
||||
- fclose(file);
|
||||
- (void) unlink(fileName);
|
||||
+
|
||||
+ return LoadXKM(want, need, &ctx, xkbRtrn);
|
||||
+}
|
||||
+
|
||||
+static unsigned
|
||||
+XkbDDXLoadKeymapFromString(DeviceIntPtr keybd,
|
||||
+ const char *keymap, int keymap_length,
|
||||
+ unsigned want,
|
||||
+ unsigned need,
|
||||
+ XkbDescPtr *xkbRtrn)
|
||||
+{
|
||||
+ XkbCompContextRec ctx;
|
||||
+
|
||||
+ *xkbRtrn = NULL;
|
||||
+
|
||||
+ if (StartXkbComp(&ctx))
|
||||
+ fwrite(keymap, keymap_length, 1, ctx.out);
|
||||
+
|
||||
+ if (!FinishXkbComp(&ctx)) {
|
||||
+ LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n");
|
||||
return 0;
|
||||
}
|
||||
- else {
|
||||
- DebugF("Loaded XKB keymap %s, defined=0x%x\n", fileName,
|
||||
- (*xkbRtrn)->defined);
|
||||
- }
|
||||
- fclose(file);
|
||||
- (void) unlink(fileName);
|
||||
- return (need | want) & (~missing);
|
||||
+
|
||||
+ return LoadXKM(want, need, &ctx, xkbRtrn);
|
||||
}
|
||||
|
||||
Bool
|
||||
@@ -407,6 +437,29 @@ XkbCompileKeymapForDevice(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, int need)
|
||||
return xkb;
|
||||
}
|
||||
|
||||
+static XkbDescPtr
|
||||
+KeymapOrDefaults(DeviceIntPtr dev, XkbDescPtr xkb)
|
||||
+{
|
||||
+ XkbRMLVOSet dflts;
|
||||
+
|
||||
+ if (xkb)
|
||||
+ return xkb;
|
||||
+
|
||||
+ /* we didn't get what we really needed. And that will likely leave
|
||||
+ * us with a keyboard that doesn't work. Use the defaults instead */
|
||||
+ LogMessage(X_ERROR, "XKB: Failed to load keymap. Loading default "
|
||||
+ "keymap instead.\n");
|
||||
+
|
||||
+ XkbGetRulesDflts(&dflts);
|
||||
+
|
||||
+ xkb = XkbCompileKeymapForDevice(dev, &dflts, 0);
|
||||
+
|
||||
+ XkbFreeRMLVOSet(&dflts, FALSE);
|
||||
+
|
||||
+ return xkb;
|
||||
+}
|
||||
+
|
||||
+
|
||||
XkbDescPtr
|
||||
XkbCompileKeymap(DeviceIntPtr dev, XkbRMLVOSet * rmlvo)
|
||||
{
|
||||
@@ -424,20 +477,34 @@ XkbCompileKeymap(DeviceIntPtr dev, XkbRMLVOSet * rmlvo)
|
||||
|
||||
xkb = XkbCompileKeymapForDevice(dev, rmlvo, need);
|
||||
|
||||
- if (!xkb) {
|
||||
- XkbRMLVOSet dflts;
|
||||
+ return KeymapOrDefaults(dev, xkb);
|
||||
+}
|
||||
|
||||
- /* we didn't get what we really needed. And that will likely leave
|
||||
- * us with a keyboard that doesn't work. Use the defaults instead */
|
||||
- LogMessage(X_ERROR, "XKB: Failed to load keymap. Loading default "
|
||||
- "keymap instead.\n");
|
||||
+XkbDescPtr
|
||||
+XkbCompileKeymapFromString(DeviceIntPtr dev,
|
||||
+ const char *keymap, int keymap_length)
|
||||
+{
|
||||
+ XkbDescPtr xkb;
|
||||
+ unsigned int need, provided;
|
||||
|
||||
- XkbGetRulesDflts(&dflts);
|
||||
+ if (!dev || !keymap) {
|
||||
+ LogMessage(X_ERROR, "XKB: No device or keymap specified\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
- xkb = XkbCompileKeymapForDevice(dev, &dflts, 0);
|
||||
+ /* These are the components we really really need */
|
||||
+ need = XkmSymbolsMask | XkmCompatMapMask | XkmTypesMask |
|
||||
+ XkmKeyNamesMask | XkmVirtualModsMask;
|
||||
|
||||
- XkbFreeRMLVOSet(&dflts, FALSE);
|
||||
+ provided =
|
||||
+ XkbDDXLoadKeymapFromString(dev, keymap, keymap_length,
|
||||
+ XkmAllIndicesMask, need, &xkb);
|
||||
+ if ((need & provided) != need) {
|
||||
+ if (xkb) {
|
||||
+ XkbFreeKeyboard(xkb, 0, TRUE);
|
||||
+ xkb = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
- return xkb;
|
||||
+ return KeymapOrDefaults(dev, xkb);
|
||||
}
|
||||
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
|
||||
index f72655f..f3f0d8f 100644
|
||||
--- a/xkb/xkbInit.c
|
||||
+++ b/xkb/xkbInit.c
|
||||
@@ -490,9 +490,10 @@ XkbInitControls(DeviceIntPtr pXDev, XkbSrvInfoPtr xkbi)
|
||||
return Success;
|
||||
}
|
||||
|
||||
-_X_EXPORT Bool
|
||||
-InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
|
||||
- BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
|
||||
+static Bool
|
||||
+InitKeyboardDeviceStructInternal(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
|
||||
+ const char *keymap, int keymap_length,
|
||||
+ BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
|
||||
{
|
||||
int i;
|
||||
unsigned int check;
|
||||
@@ -507,7 +508,7 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
|
||||
BUG_RETURN_VAL(dev->key != NULL, FALSE);
|
||||
BUG_RETURN_VAL(dev->kbdfeed != NULL, FALSE);
|
||||
|
||||
- if (!rmlvo) {
|
||||
+ if (!rmlvo && !keymap) {
|
||||
rmlvo = &rmlvo_dflts;
|
||||
XkbGetRulesDflts(rmlvo);
|
||||
}
|
||||
@@ -535,19 +536,26 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
|
||||
}
|
||||
dev->key->xkbInfo = xkbi;
|
||||
|
||||
- if (xkb_cached_map && !XkbCompareUsedRMLVO(rmlvo)) {
|
||||
+ if (xkb_cached_map && (keymap || (rmlvo && !XkbCompareUsedRMLVO(rmlvo)))) {
|
||||
XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE);
|
||||
xkb_cached_map = NULL;
|
||||
}
|
||||
|
||||
if (xkb_cached_map)
|
||||
LogMessageVerb(X_INFO, 4, "XKB: Reusing cached keymap\n");
|
||||
- else {
|
||||
+ else if (rmlvo) {
|
||||
xkb_cached_map = XkbCompileKeymap(dev, rmlvo);
|
||||
if (!xkb_cached_map) {
|
||||
ErrorF("XKB: Failed to compile keymap\n");
|
||||
goto unwind_info;
|
||||
}
|
||||
+ } else {
|
||||
+ xkb_cached_map = XkbCompileKeymapFromString(dev,
|
||||
+ keymap, keymap_length);
|
||||
+ if (!xkb_cached_map) {
|
||||
+ ErrorF("XKB: Failed to compile keymap from string\n");
|
||||
+ goto unwind_info;
|
||||
+ }
|
||||
}
|
||||
|
||||
xkb = XkbAllocKeyboard();
|
||||
@@ -612,8 +620,10 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
|
||||
|
||||
dev->kbdfeed->CtrlProc(dev, &dev->kbdfeed->ctrl);
|
||||
|
||||
- XkbSetRulesDflts(rmlvo);
|
||||
- XkbSetRulesUsed(rmlvo);
|
||||
+ if (rmlvo) {
|
||||
+ XkbSetRulesDflts(rmlvo);
|
||||
+ XkbSetRulesUsed(rmlvo);
|
||||
+ }
|
||||
XkbFreeRMLVOSet(&rmlvo_dflts, FALSE);
|
||||
|
||||
return TRUE;
|
||||
@@ -632,6 +642,24 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+_X_EXPORT Bool
|
||||
+InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
|
||||
+ BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
|
||||
+{
|
||||
+ return InitKeyboardDeviceStructInternal(dev, rmlvo,
|
||||
+ NULL, 0, bell_func, ctrl_func);
|
||||
+}
|
||||
+
|
||||
+_X_EXPORT Bool
|
||||
+InitKeyboardDeviceStructFromString(DeviceIntPtr dev,
|
||||
+ const char *keymap, int keymap_length,
|
||||
+ BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
|
||||
+{
|
||||
+ return InitKeyboardDeviceStructInternal(dev, NULL,
|
||||
+ keymap, keymap_length,
|
||||
+ bell_func, ctrl_func);
|
||||
+}
|
||||
+
|
||||
/***====================================================================***/
|
||||
|
||||
/*
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,137 +0,0 @@
|
||||
From efa65f0bd25889d34b690b91839a0b36d5864b39 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Tue, 21 Jun 2011 21:28:31 -0400
|
||||
Subject: [PATCH 05/38] os: Add a function to create a client for an fd
|
||||
|
||||
---
|
||||
include/opaque.h | 1 +
|
||||
include/os.h | 5 +++--
|
||||
os/connection.c | 32 +++++++++++++++++++++++++++++---
|
||||
os/utils.c | 6 +++++-
|
||||
4 files changed, 38 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/opaque.h b/include/opaque.h
|
||||
index b76ab6e..8ad9af0 100644
|
||||
--- a/include/opaque.h
|
||||
+++ b/include/opaque.h
|
||||
@@ -74,5 +74,6 @@ extern _X_EXPORT Bool whiteRoot;
|
||||
extern _X_EXPORT Bool bgNoneRoot;
|
||||
|
||||
extern _X_EXPORT Bool CoreDump;
|
||||
+extern _X_EXPORT Bool NoListenAll;
|
||||
|
||||
#endif /* OPAQUE_H */
|
||||
diff --git a/include/os.h b/include/os.h
|
||||
index 9b67294..c36d09a 100644
|
||||
--- a/include/os.h
|
||||
+++ b/include/os.h
|
||||
@@ -166,8 +166,9 @@ extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client */ );
|
||||
|
||||
extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client */ );
|
||||
|
||||
-#ifdef XQUARTZ
|
||||
-extern void ListenOnOpenFD(int /* fd */ , int /* noxauth */ );
|
||||
+#if defined(XQUARTZ) || defined(XORG_WAYLAND)
|
||||
+extern _X_EXPORT void ListenOnOpenFD(int /* fd */ , int /* noxauth */ );
|
||||
+extern _X_EXPORT void AddClientOnOpenFD(int /* fd */ );
|
||||
#endif
|
||||
|
||||
extern _X_EXPORT CARD32 GetTimeInMillis(void);
|
||||
diff --git a/os/connection.c b/os/connection.c
|
||||
index 162e1d9..a95e7da 100644
|
||||
--- a/os/connection.c
|
||||
+++ b/os/connection.c
|
||||
@@ -64,6 +64,7 @@ SOFTWARE.
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
+#include <xorg-server.h>
|
||||
#ifdef WIN32
|
||||
#include <X11/Xwinsock.h>
|
||||
#endif
|
||||
@@ -138,6 +139,7 @@ fd_set OutputPending; /* clients with reply/event data ready to go */
|
||||
int MaxClients = 0;
|
||||
Bool NewOutputPending; /* not yet attempted to write some new output */
|
||||
Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
|
||||
+Bool NoListenAll; /* Don't establish any listening sockets */
|
||||
|
||||
static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
|
||||
Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or
|
||||
@@ -406,7 +408,10 @@ CreateWellKnownSockets(void)
|
||||
/* display is initialized to "0" by main(). It is then set to the display
|
||||
* number if specified on the command line, or to NULL when the -displayfd
|
||||
* option is used. */
|
||||
- if (display) {
|
||||
+ if (NoListenAll) {
|
||||
+ ListenTransCount = 0;
|
||||
+ }
|
||||
+ else if (display) {
|
||||
if (TryCreateSocket(atoi(display), &partial) &&
|
||||
ListenTransCount >= 1)
|
||||
if (!PartialNetwork && partial)
|
||||
@@ -440,9 +445,10 @@ CreateWellKnownSockets(void)
|
||||
DefineSelf (fd);
|
||||
}
|
||||
|
||||
- if (!XFD_ANYSET(&WellKnownConnections))
|
||||
+ if (!XFD_ANYSET(&WellKnownConnections) && !NoListenAll)
|
||||
FatalError
|
||||
("Cannot establish any listening sockets - Make sure an X server isn't already running");
|
||||
+
|
||||
#if !defined(WIN32)
|
||||
OsSignal(SIGPIPE, SIG_IGN);
|
||||
OsSignal(SIGHUP, AutoResetServer);
|
||||
@@ -1253,7 +1259,7 @@ MakeClientGrabPervious(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
-#ifdef XQUARTZ
|
||||
+#if defined(XQUARTZ) || defined(XORG_WAYLAND)
|
||||
/* Add a fd (from launchd) to our listeners */
|
||||
void
|
||||
ListenOnOpenFD(int fd, int noxauth)
|
||||
@@ -1309,4 +1315,24 @@ ListenOnOpenFD(int fd, int noxauth)
|
||||
#endif
|
||||
}
|
||||
|
||||
+/* based on TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status) */
|
||||
+void
|
||||
+AddClientOnOpenFD(int fd)
|
||||
+{
|
||||
+ XtransConnInfo ciptr;
|
||||
+ CARD32 connect_time;
|
||||
+
|
||||
+ ciptr = _XSERVTransReopenCOTSServer(5, fd, "@anonymous");
|
||||
+
|
||||
+ _XSERVTransSetOption(ciptr, TRANS_NONBLOCKING, 1);
|
||||
+ ciptr->flags |= TRANS_NOXAUTH;
|
||||
+
|
||||
+ connect_time = GetTimeInMillis();
|
||||
+
|
||||
+ if (!AllocNewConnection(ciptr, fd, connect_time)) {
|
||||
+ fprintf(stderr, "failed to create client for wayland server\n");
|
||||
+ return;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
#endif
|
||||
diff --git a/os/utils.c b/os/utils.c
|
||||
index 608ee6a..a0cf951 100644
|
||||
--- a/os/utils.c
|
||||
+++ b/os/utils.c
|
||||
@@ -805,7 +805,11 @@ ProcessCommandLine(int argc, char *argv[])
|
||||
#endif
|
||||
else if (strcmp(argv[i], "-nolisten") == 0) {
|
||||
if (++i < argc) {
|
||||
- if (_XSERVTransNoListen(argv[i]))
|
||||
+ if (strcmp(argv[i], "all") == 0) {
|
||||
+ NoListenAll = TRUE;
|
||||
+ nolock = TRUE;
|
||||
+ }
|
||||
+ else if (_XSERVTransNoListen(argv[i]))
|
||||
ErrorF("Failed to disable listen for %s transport",
|
||||
argv[i]);
|
||||
}
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,44 +0,0 @@
|
||||
From f5767856b6dc214a7beb7c1f914a2e491da3f0c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Thu, 21 Jul 2011 09:55:46 -0700
|
||||
Subject: [PATCH 06/38] Export xf86NewInputDevice and xf86AllocateInput
|
||||
|
||||
---
|
||||
hw/xfree86/common/xf86Xinput.c | 2 +-
|
||||
hw/xfree86/common/xf86Xinput.h | 7 +++----
|
||||
2 files changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
|
||||
index 26c03c6..7669ee0 100644
|
||||
--- a/hw/xfree86/common/xf86Xinput.c
|
||||
+++ b/hw/xfree86/common/xf86Xinput.c
|
||||
@@ -811,7 +811,7 @@ xf86InputDevicePostInit(DeviceIntPtr dev)
|
||||
*
|
||||
* @return Success or an error code
|
||||
*/
|
||||
-_X_INTERNAL int
|
||||
+int
|
||||
xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
|
||||
{
|
||||
InputDriverPtr drv = NULL;
|
||||
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
|
||||
index 35c38a5..ff3d894 100644
|
||||
--- a/hw/xfree86/common/xf86Xinput.h
|
||||
+++ b/hw/xfree86/common/xf86Xinput.h
|
||||
@@ -172,10 +172,9 @@ extern _X_EXPORT void xf86AddEnabledDevice(InputInfoPtr pInfo);
|
||||
extern _X_EXPORT void xf86RemoveEnabledDevice(InputInfoPtr pInfo);
|
||||
extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic);
|
||||
extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev);
|
||||
-
|
||||
-/* not exported */
|
||||
-int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto);
|
||||
-InputInfoPtr xf86AllocateInput(void);
|
||||
+extern _X_EXPORT int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev,
|
||||
+ BOOL is_auto);
|
||||
+extern _X_EXPORT InputInfoPtr xf86AllocateInput(void);
|
||||
|
||||
/* xf86Helper.c */
|
||||
extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, pointer module,
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,89 +0,0 @@
|
||||
From 65f033e38116ed4ebf318a7521190536e8fc6b1c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@redhat.com>
|
||||
Date: Fri, 18 Sep 2009 22:09:03 -0400
|
||||
Subject: [PATCH 07/38] Add redirect window for input device feature
|
||||
|
||||
---
|
||||
Xi/exevents.c | 13 +++++++++++++
|
||||
dix/events.c | 11 ++++++++++-
|
||||
include/exevents.h | 4 ++++
|
||||
include/inputstr.h | 2 ++
|
||||
4 files changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Xi/exevents.c b/Xi/exevents.c
|
||||
index 5dc9020..69b4038 100644
|
||||
--- a/Xi/exevents.c
|
||||
+++ b/Xi/exevents.c
|
||||
@@ -2025,6 +2025,19 @@ DeliverTouchEvents(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||
}
|
||||
}
|
||||
|
||||
+void
|
||||
+SetDeviceRedirectWindow(DeviceIntPtr dev, WindowPtr window)
|
||||
+{
|
||||
+ SpritePtr pSprite = dev->spriteInfo->sprite;
|
||||
+ DeviceIntPtr mouse;
|
||||
+
|
||||
+ mouse = IsMaster(dev) ? dev : GetMaster(dev, MASTER_POINTER);
|
||||
+
|
||||
+ pSprite->redirectWindow = window;
|
||||
+
|
||||
+ CheckMotion(NULL, mouse);
|
||||
+}
|
||||
+
|
||||
int
|
||||
InitProximityClassDeviceStruct(DeviceIntPtr dev)
|
||||
{
|
||||
diff --git a/dix/events.c b/dix/events.c
|
||||
index 4632bb7..9caa8b0 100644
|
||||
--- a/dix/events.c
|
||||
+++ b/dix/events.c
|
||||
@@ -2877,7 +2877,16 @@ XYToWindow(SpritePtr pSprite, int x, int y)
|
||||
BoxRec box;
|
||||
|
||||
pSprite->spriteTraceGood = 1; /* root window still there */
|
||||
- pWin = RootWindow(pSprite)->firstChild;
|
||||
+ if (pSprite->redirectWindow == PointerRootWin) {
|
||||
+ return RootWindow(pSprite);
|
||||
+ }
|
||||
+ else if (pSprite->redirectWindow) {
|
||||
+ pWin = pSprite->redirectWindow;
|
||||
+ pSprite->spriteTrace[pSprite->spriteTraceGood++] = pWin;
|
||||
+ pWin = pWin->firstChild;
|
||||
+ }
|
||||
+ else
|
||||
+ pWin = RootWindow(pSprite)->firstChild;
|
||||
while (pWin) {
|
||||
if ((pWin->mapped) &&
|
||||
(x >= pWin->drawable.x - wBorderWidth(pWin)) &&
|
||||
diff --git a/include/exevents.h b/include/exevents.h
|
||||
index 321fc42..ba93be3 100644
|
||||
--- a/include/exevents.h
|
||||
+++ b/include/exevents.h
|
||||
@@ -162,6 +162,10 @@ extern void
|
||||
ProcessOtherEvent(InternalEvent * /* ev */ ,
|
||||
DeviceIntPtr /* other */ );
|
||||
|
||||
+extern _X_EXPORT void
|
||||
+ SetDeviceRedirectWindow(DeviceIntPtr /* dev */ ,
|
||||
+ WindowPtr /* window */ );
|
||||
+
|
||||
extern int
|
||||
CheckGrabValues(ClientPtr /* client */ ,
|
||||
GrabParameters * /* param */ );
|
||||
diff --git a/include/inputstr.h b/include/inputstr.h
|
||||
index dc36c5d..09471cf 100644
|
||||
--- a/include/inputstr.h
|
||||
+++ b/include/inputstr.h
|
||||
@@ -246,6 +246,8 @@ typedef struct _SpriteRec {
|
||||
ScreenPtr pEnqueueScreen;
|
||||
ScreenPtr pDequeueScreen;
|
||||
|
||||
+ WindowPtr redirectWindow;
|
||||
+
|
||||
} SpriteRec;
|
||||
|
||||
typedef struct _KeyClassRec {
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,144 +0,0 @@
|
||||
From 39fddd5e087ee7681e7a26182dd7398dd64bc43f Mon Sep 17 00:00:00 2001
|
||||
From: Tiago Vignatti <tiago.vignatti@intel.com>
|
||||
Date: Wed, 21 Aug 2013 21:23:09 -0700
|
||||
Subject: [PATCH 08/38] dri2: Introduce a third version of the AuthMagic
|
||||
function
|
||||
|
||||
This most recent version takes a client pointer to allow xwayland to
|
||||
asynchronously authenticate a client.
|
||||
---
|
||||
hw/xfree86/dri2/dri2.c | 12 ++++++++----
|
||||
hw/xfree86/dri2/dri2.h | 7 +++++++
|
||||
hw/xfree86/dri2/dri2ext.c | 27 +++++++++++++++++++--------
|
||||
3 files changed, 34 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
|
||||
index 0b047f0..efdcd66 100644
|
||||
--- a/hw/xfree86/dri2/dri2.c
|
||||
+++ b/hw/xfree86/dri2/dri2.c
|
||||
@@ -121,8 +121,9 @@ typedef struct _DRI2Screen {
|
||||
DRI2ScheduleSwapProcPtr ScheduleSwap;
|
||||
DRI2GetMSCProcPtr GetMSC;
|
||||
DRI2ScheduleWaitMSCProcPtr ScheduleWaitMSC;
|
||||
- DRI2AuthMagic2ProcPtr AuthMagic;
|
||||
DRI2AuthMagicProcPtr LegacyAuthMagic;
|
||||
+ DRI2AuthMagic2ProcPtr LegacyAuthMagic2;
|
||||
+ DRI2AuthMagic3ProcPtr AuthMagic;
|
||||
DRI2ReuseBufferNotifyProcPtr ReuseBufferNotify;
|
||||
DRI2SwapLimitValidateProcPtr SwapLimitValidate;
|
||||
DRI2GetParamProcPtr GetParam;
|
||||
@@ -1352,7 +1353,7 @@ DRI2Authenticate(ClientPtr client, ScreenPtr pScreen, uint32_t magic)
|
||||
return FALSE;
|
||||
|
||||
primescreen = GetScreenPrime(pScreen, dri2_client->prime_id);
|
||||
- if ((*ds->AuthMagic)(primescreen, magic))
|
||||
+ if ((*ds->AuthMagic)(client, primescreen, magic))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1457,8 +1458,11 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
|
||||
cur_minor = 1;
|
||||
}
|
||||
|
||||
+ if (info->version >= 10) {
|
||||
+ ds->AuthMagic = info->AuthMagic3;
|
||||
+ }
|
||||
if (info->version >= 8) {
|
||||
- ds->AuthMagic = info->AuthMagic2;
|
||||
+ ds->LegacyAuthMagic2 = info->AuthMagic2;
|
||||
}
|
||||
if (info->version >= 5) {
|
||||
ds->LegacyAuthMagic = info->AuthMagic;
|
||||
@@ -1497,7 +1501,7 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
|
||||
* If the driver doesn't provide an AuthMagic function
|
||||
* it relies on the old method (using libdrm) or fails
|
||||
*/
|
||||
- if (!ds->LegacyAuthMagic)
|
||||
+ if (!ds->LegacyAuthMagic2 && !ds->LegacyAuthMagic)
|
||||
#ifdef WITH_LIBDRM
|
||||
ds->LegacyAuthMagic = drmAuthMagic;
|
||||
#else
|
||||
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
|
||||
index 1e7afdd..38b4f58 100644
|
||||
--- a/hw/xfree86/dri2/dri2.h
|
||||
+++ b/hw/xfree86/dri2/dri2.h
|
||||
@@ -65,6 +65,8 @@ typedef void (*DRI2CopyRegionProcPtr) (DrawablePtr pDraw,
|
||||
typedef void (*DRI2WaitProcPtr) (WindowPtr pWin, unsigned int sequence);
|
||||
typedef int (*DRI2AuthMagicProcPtr) (int fd, uint32_t magic);
|
||||
typedef int (*DRI2AuthMagic2ProcPtr) (ScreenPtr pScreen, uint32_t magic);
|
||||
+typedef int (*DRI2AuthMagic3ProcPtr) (ClientPtr client,
|
||||
+ ScreenPtr pScreen, uint32_t magic);
|
||||
|
||||
/**
|
||||
* Schedule a buffer swap
|
||||
@@ -252,6 +254,9 @@ typedef struct {
|
||||
DRI2CreateBuffer2ProcPtr CreateBuffer2;
|
||||
DRI2DestroyBuffer2ProcPtr DestroyBuffer2;
|
||||
DRI2CopyRegion2ProcPtr CopyRegion2;
|
||||
+
|
||||
+ /* added in version 10 */
|
||||
+ DRI2AuthMagic3ProcPtr AuthMagic3;
|
||||
} DRI2InfoRec, *DRI2InfoPtr;
|
||||
|
||||
extern _X_EXPORT Bool DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info);
|
||||
@@ -268,6 +273,8 @@ extern _X_EXPORT Bool DRI2Connect(ClientPtr client, ScreenPtr pScreen,
|
||||
|
||||
extern _X_EXPORT Bool DRI2Authenticate(ClientPtr client, ScreenPtr pScreen, uint32_t magic);
|
||||
|
||||
+extern _X_EXPORT void DRI2SendAuthReply(ClientPtr client, Bool status);
|
||||
+
|
||||
extern _X_EXPORT int DRI2CreateDrawable(ClientPtr client,
|
||||
DrawablePtr pDraw,
|
||||
XID id,
|
||||
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
|
||||
index ffd66fa..b858213 100644
|
||||
--- a/hw/xfree86/dri2/dri2ext.c
|
||||
+++ b/hw/xfree86/dri2/dri2ext.c
|
||||
@@ -136,11 +136,23 @@ ProcDRI2Connect(ClientPtr client)
|
||||
return Success;
|
||||
}
|
||||
|
||||
+void
|
||||
+DRI2SendAuthReply(ClientPtr client, Bool status)
|
||||
+{
|
||||
+ xDRI2AuthenticateReply rep = {
|
||||
+ .type = X_Reply,
|
||||
+ .sequenceNumber = client->sequence,
|
||||
+ .length = 0,
|
||||
+ .authenticated = status
|
||||
+ };
|
||||
+
|
||||
+ WriteToClient(client, sizeof(xDRI2AuthenticateReply), &rep);
|
||||
+}
|
||||
+
|
||||
static int
|
||||
ProcDRI2Authenticate(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDRI2AuthenticateReq);
|
||||
- xDRI2AuthenticateReply rep;
|
||||
DrawablePtr pDraw;
|
||||
int status;
|
||||
|
||||
@@ -149,13 +161,12 @@ ProcDRI2Authenticate(ClientPtr client)
|
||||
&pDraw, &status))
|
||||
return status;
|
||||
|
||||
- rep = (xDRI2AuthenticateReply) {
|
||||
- .type = X_Reply,
|
||||
- .sequenceNumber = client->sequence,
|
||||
- .length = 0,
|
||||
- .authenticated = DRI2Authenticate(client, pDraw->pScreen, stuff->magic)
|
||||
- };
|
||||
- WriteToClient(client, sizeof(xDRI2AuthenticateReply), &rep);
|
||||
+ status = DRI2Authenticate(client, pDraw->pScreen, stuff->magic);
|
||||
+
|
||||
+ /* if non-blocking authentication is in progress, then don't send a reply
|
||||
+ * now but later in the implementation (e.g. drm_handle_authenticated) */
|
||||
+ if (client->ignoreCount == 0)
|
||||
+ DRI2SendAuthReply(client, status);
|
||||
|
||||
return Success;
|
||||
}
|
||||
--
|
||||
1.8.4.2
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,49 +0,0 @@
|
||||
From b50ab974f639e02f878e608bf7f6097be7fbc60c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Wed, 21 Aug 2013 23:02:58 -0700
|
||||
Subject: [PATCH 10/38] xwayland: Add a HW_WAYLAND flag to let drivers
|
||||
explicitly opt-in
|
||||
|
||||
---
|
||||
hw/xfree86/common/xf86Init.c | 11 +++++++----
|
||||
hw/xfree86/common/xf86str.h | 1 +
|
||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
|
||||
index 98adaab..2d3bb01 100644
|
||||
--- a/hw/xfree86/common/xf86Init.c
|
||||
+++ b/hw/xfree86/common/xf86Init.c
|
||||
@@ -547,11 +547,14 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||
if (!(flags & HW_SKIP_CONSOLE))
|
||||
xorgHWOpenConsole = TRUE;
|
||||
|
||||
- if (xorgWayland &&
|
||||
- (NEED_IO_ENABLED(flags) || !(flags & HW_SKIP_CONSOLE))) {
|
||||
+ if (xorgWayland) {
|
||||
+ if (flags != HW_WAYLAND) {
|
||||
+ xf86DeleteDriver(i);
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
- xf86DeleteDriver(i);
|
||||
- continue;
|
||||
+ want_hw_access = FALSE;
|
||||
+ xorgHWOpenConsole = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
|
||||
index 4c2d147..976fa30 100644
|
||||
--- a/hw/xfree86/common/xf86str.h
|
||||
+++ b/hw/xfree86/common/xf86str.h
|
||||
@@ -288,6 +288,7 @@ typedef struct {
|
||||
#define HW_MMIO 2
|
||||
#define HW_SKIP_CONSOLE 4
|
||||
#define NEED_IO_ENABLED(x) (x & HW_IO)
|
||||
+#define HW_WAYLAND 8
|
||||
|
||||
typedef CARD32 xorgHWFlags;
|
||||
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,31 +0,0 @@
|
||||
From 341f2f5de09e59c3498d5f4e626b8fd86f4a0dcd Mon Sep 17 00:00:00 2001
|
||||
From: Giovanni Campagna <gcampagn@redhat.com>
|
||||
Date: Wed, 21 Aug 2013 09:53:25 +0200
|
||||
Subject: [PATCH 11/38] xwayland-shm: don't create alpha buffers if the window
|
||||
doesn't have alpha
|
||||
|
||||
If the window is using a 24 bit visual, we must request a buffer
|
||||
format without alpha, or garbage is rendered.
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
|
||||
index f59bfe4..880b7ec 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland.c
|
||||
@@ -278,7 +278,10 @@ xwl_create_window_buffer_shm(struct xwl_window *xwl_window,
|
||||
xwl_window->buffer = wl_shm_pool_create_buffer(pool, 0,
|
||||
pixmap->drawable.width,
|
||||
pixmap->drawable.height,
|
||||
- stride, WL_SHM_FORMAT_ARGB8888);
|
||||
+ stride,
|
||||
+ pixmap->drawable.depth == 32 ?
|
||||
+ WL_SHM_FORMAT_ARGB8888 :
|
||||
+ WL_SHM_FORMAT_XRGB8888);
|
||||
wl_shm_pool_destroy(pool);
|
||||
|
||||
return xwl_window->buffer ? Success : BadDrawable;
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,234 +0,0 @@
|
||||
From 1e37681072a69decce7441e762cb5f4ce1a80d73 Mon Sep 17 00:00:00 2001
|
||||
From: Giovanni Campagna <gcampagn@redhat.com>
|
||||
Date: Wed, 21 Aug 2013 09:53:26 +0200
|
||||
Subject: [PATCH 12/38] xwayland: handle global object destruction
|
||||
|
||||
Certain global objects, such as outputs, can be destroyed during
|
||||
the session. We must handle that and not crash.
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-drm.c | 7 ++++++
|
||||
hw/xfree86/xwayland/xwayland-input.c | 7 ++++++
|
||||
hw/xfree86/xwayland/xwayland-output.c | 40 +++++++++++++++++++++++++++++++---
|
||||
hw/xfree86/xwayland/xwayland-private.h | 6 ++++-
|
||||
hw/xfree86/xwayland/xwayland.c | 17 +++++++++++----
|
||||
5 files changed, 69 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-drm.c b/hw/xfree86/xwayland/xwayland-drm.c
|
||||
index ce56e4c..6e4c778 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-drm.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-drm.c
|
||||
@@ -119,8 +119,15 @@ drm_handler(void *data, struct wl_registry *registry, uint32_t id,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+global_remove(void *data, struct wl_registry *registry, uint32_t name)
|
||||
+{
|
||||
+ /* Nothing to do here, wl_drm should not be removed */
|
||||
+}
|
||||
+
|
||||
static const struct wl_registry_listener drm_listener = {
|
||||
drm_handler,
|
||||
+ global_remove
|
||||
};
|
||||
|
||||
int
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
|
||||
index 2f8e0c7..d031b34 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-input.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-input.c
|
||||
@@ -597,8 +597,15 @@ input_handler(void *data, struct wl_registry *registry, uint32_t id,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+global_remove(void *data, struct wl_registry *registry, uint32_t name)
|
||||
+{
|
||||
+ /* FIXME */
|
||||
+}
|
||||
+
|
||||
static const struct wl_registry_listener input_listener = {
|
||||
input_handler,
|
||||
+ global_remove,
|
||||
};
|
||||
|
||||
void
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-output.c b/hw/xfree86/xwayland/xwayland-output.c
|
||||
index 8f087f6..46238f4 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-output.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-output.c
|
||||
@@ -95,6 +95,14 @@ crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
|
||||
{
|
||||
}
|
||||
|
||||
+static void
|
||||
+crtc_destroy(xf86CrtcPtr crtc)
|
||||
+{
|
||||
+ /* Nothing to do here, we only destroy CRTCs when instructed to do
|
||||
+ so by wl_output changes
|
||||
+ */
|
||||
+}
|
||||
+
|
||||
static const xf86CrtcFuncsRec crtc_funcs = {
|
||||
.dpms = crtc_dpms,
|
||||
.set_mode_major = crtc_set_mode_major,
|
||||
@@ -106,7 +114,7 @@ static const xf86CrtcFuncsRec crtc_funcs = {
|
||||
.shadow_create = crtc_shadow_create,
|
||||
.shadow_allocate = crtc_shadow_allocate,
|
||||
.shadow_destroy = crtc_shadow_destroy,
|
||||
- .destroy = NULL, /* XXX */
|
||||
+ .destroy = crtc_destroy,
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -246,7 +254,7 @@ display_handle_geometry(void *data, struct wl_output *wl_output, int x, int y,
|
||||
xwl_output->x = x;
|
||||
xwl_output->y = y;
|
||||
|
||||
- xwl_screen->xwl_output = xwl_output;
|
||||
+ xorg_list_append (&xwl_output->link, &xwl_screen->output_list);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -277,13 +285,39 @@ global_handler(void *data, struct wl_registry *registry, uint32_t id,
|
||||
xwl_output = xwl_output_create(xwl_screen);
|
||||
xwl_output->output = wl_registry_bind(registry, id,
|
||||
&wl_output_interface, 1);
|
||||
+ xwl_output->name = id;
|
||||
wl_output_add_listener(xwl_output->output,
|
||||
&output_listener, xwl_output);
|
||||
}
|
||||
}
|
||||
|
||||
+void
|
||||
+xwl_output_remove(struct xwl_output *xwl_output)
|
||||
+{
|
||||
+ xorg_list_del (&xwl_output->link);
|
||||
+ xf86OutputDestroy (xwl_output->xf86output);
|
||||
+ xf86CrtcDestroy (xwl_output->xf86crtc);
|
||||
+
|
||||
+ wl_output_destroy (xwl_output->output);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+global_remove(void *data, struct wl_registry *registry, uint32_t name)
|
||||
+{
|
||||
+ struct xwl_screen *xwl_screen = data;
|
||||
+ struct xwl_output *xwl_output, *tmp;
|
||||
+
|
||||
+ xorg_list_for_each_entry_safe (xwl_output, tmp, &xwl_screen->output_list, link) {
|
||||
+ if (xwl_output->name == name) {
|
||||
+ xwl_output_remove(xwl_output);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static const struct wl_registry_listener global_listener = {
|
||||
global_handler,
|
||||
+ global_remove
|
||||
};
|
||||
|
||||
void
|
||||
@@ -299,7 +333,7 @@ xwayland_screen_preinit_output(struct xwl_screen *xwl_screen, ScrnInfoPtr scrnin
|
||||
wl_registry_add_listener(xwl_screen->output_registry, &global_listener,
|
||||
xwl_screen);
|
||||
|
||||
- while (!xwl_screen->xwl_output) {
|
||||
+ while (xwl_screen->output_list.next == &xwl_screen->output_list) {
|
||||
ret = wl_display_roundtrip(xwl_screen->display);
|
||||
if (ret == -1)
|
||||
FatalError("failed to dispatch Wayland events: %s\n", strerror(errno));
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-private.h b/hw/xfree86/xwayland/xwayland-private.h
|
||||
index e427316..7005db2 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-private.h
|
||||
+++ b/hw/xfree86/xwayland/xwayland-private.h
|
||||
@@ -44,7 +44,6 @@ struct xwl_screen {
|
||||
ScrnInfoPtr scrninfo;
|
||||
int drm_fd;
|
||||
int wayland_fd;
|
||||
- struct xwl_output *xwl_output;
|
||||
struct wl_display *display;
|
||||
struct wl_registry *registry;
|
||||
struct wl_registry *drm_registry;
|
||||
@@ -58,6 +57,7 @@ struct xwl_screen {
|
||||
uint32_t flags;
|
||||
char *device_name;
|
||||
uint32_t authenticated;
|
||||
+ struct xorg_list output_list;
|
||||
struct xorg_list seat_list;
|
||||
struct xorg_list damage_window_list;
|
||||
struct xorg_list window_list;
|
||||
@@ -74,12 +74,14 @@ struct xwl_screen {
|
||||
};
|
||||
|
||||
struct xwl_output {
|
||||
+ struct xorg_list link;
|
||||
struct wl_output *output;
|
||||
struct xwl_screen *xwl_screen;
|
||||
int32_t x, y, width, height;
|
||||
xf86Monitor xf86monitor;
|
||||
xf86OutputPtr xf86output;
|
||||
xf86CrtcPtr xf86crtc;
|
||||
+ int32_t name;
|
||||
};
|
||||
|
||||
|
||||
@@ -127,6 +129,8 @@ Bool xwl_drm_initialised(struct xwl_screen *screen);
|
||||
|
||||
void xwl_seat_set_cursor(struct xwl_seat *xwl_seat);
|
||||
|
||||
+void xwl_output_remove(struct xwl_output *output);
|
||||
+
|
||||
extern const struct xserver_listener xwl_server_listener;
|
||||
|
||||
#endif /* _XWAYLAND_PRIVATE_H_ */
|
||||
diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
|
||||
index 880b7ec..2047a85 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland.c
|
||||
@@ -103,8 +103,15 @@ registry_global(void *data, struct wl_registry *registry, uint32_t id,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+global_remove(void *data, struct wl_registry *registry, uint32_t name)
|
||||
+{
|
||||
+ /* Nothing to do here, wl_compositor and wl_shm should not be removed */
|
||||
+}
|
||||
+
|
||||
static const struct wl_registry_listener registry_listener = {
|
||||
registry_global,
|
||||
+ global_remove
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -230,6 +237,7 @@ xwl_screen_pre_init(ScrnInfoPtr scrninfo, struct xwl_screen *xwl_screen,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ xorg_list_init(&xwl_screen->output_list);
|
||||
xorg_list_init(&xwl_screen->seat_list);
|
||||
xorg_list_init(&xwl_screen->damage_window_list);
|
||||
xorg_list_init(&xwl_screen->window_list);
|
||||
@@ -318,12 +326,13 @@ void xwl_screen_close(struct xwl_screen *xwl_screen)
|
||||
|
||||
void xwl_screen_destroy(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
- if (xwl_screen->xwl_output) {
|
||||
- xf86OutputDestroy(xwl_screen->xwl_output->xf86output);
|
||||
- xf86CrtcDestroy(xwl_screen->xwl_output->xf86crtc);
|
||||
+ struct xwl_output *xwl_output, *tmp;
|
||||
+
|
||||
+ xorg_list_for_each_entry_safe (xwl_output, tmp, &xwl_screen->output_list, link) {
|
||||
+ xwl_output_remove(xwl_output);
|
||||
+ break;
|
||||
}
|
||||
|
||||
- free(xwl_screen->xwl_output);
|
||||
free(xwl_screen);
|
||||
}
|
||||
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,215 +0,0 @@
|
||||
From c22c7d4062b24f10a1d841629cc1e1822cad1f45 Mon Sep 17 00:00:00 2001
|
||||
From: Giovanni Campagna <gcampagn@redhat.com>
|
||||
Date: Thu, 22 Aug 2013 16:23:48 +0200
|
||||
Subject: [PATCH 13/38] xwayland: add support for multiple outputs
|
||||
|
||||
Drop xf86InitialConfiguration, which just gets in the way
|
||||
of the compositor doing its own output arrangement, and transform
|
||||
wayland events into the appropriate low-level xf86 calls to
|
||||
keep the screen size updated.
|
||||
|
||||
Kristian: after the rebase it was crashing for me too, had to fix
|
||||
the patch a bit. This one should work, and also gives sensible (though
|
||||
not perfect) results for xrandr clients.
|
||||
Tested with weston/x11 and mutter-wayland/kms.
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-output.c | 112 ++++++++++++++++++++++++++++++---
|
||||
hw/xfree86/xwayland/xwayland-private.h | 2 +
|
||||
2 files changed, 105 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-output.c b/hw/xfree86/xwayland/xwayland-output.c
|
||||
index 46238f4..66c7d48 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-output.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-output.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <cursorstr.h>
|
||||
#include <xf86Crtc.h>
|
||||
#include <mipointrst.h>
|
||||
+#include <randrstr.h>
|
||||
|
||||
#include "xwayland.h"
|
||||
#include "xwayland-private.h"
|
||||
@@ -182,6 +183,10 @@ xwl_output_create(struct xwl_screen *xwl_screen)
|
||||
struct xwl_output *xwl_output;
|
||||
xf86OutputPtr xf86output;
|
||||
xf86CrtcPtr xf86crtc;
|
||||
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(xwl_screen->scrninfo);
|
||||
+ int crtcId, outputId;
|
||||
+ static int nameId;
|
||||
+ char *name;
|
||||
|
||||
xwl_output = calloc(sizeof *xwl_output, 1);
|
||||
if (xwl_output == NULL) {
|
||||
@@ -189,19 +194,41 @@ xwl_output_create(struct xwl_screen *xwl_screen)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+ nameId++;
|
||||
+ if (asprintf(&name, "XWAYLAND-%d", nameId) < 0) {
|
||||
+ ErrorF("create_output ENOMEM");
|
||||
+ free(xwl_output);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
xwl_output->xwl_screen = xwl_screen;
|
||||
|
||||
+ xf86crtc = xf86CrtcCreate(xwl_screen->scrninfo, &crtc_funcs);
|
||||
+ xf86crtc->enabled = TRUE;
|
||||
+ xf86crtc->driver_private = xwl_output;
|
||||
+
|
||||
+ for (crtcId = 0; crtcId < xf86_config->num_crtc; crtcId++) {
|
||||
+ if (xf86_config->crtc[crtcId] == xf86crtc)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
xf86output = xf86OutputCreate(xwl_screen->scrninfo,
|
||||
- &output_funcs, "XWAYLAND-1");
|
||||
+ &output_funcs, name);
|
||||
xf86output->driver_private = xwl_output;
|
||||
- xf86output->possible_crtcs = 1;
|
||||
- xf86output->possible_clones = 1;
|
||||
+ xf86output->possible_crtcs = 1 << crtcId;
|
||||
|
||||
- xf86crtc = xf86CrtcCreate(xwl_screen->scrninfo, &crtc_funcs);
|
||||
- xf86crtc->driver_private = xwl_output;
|
||||
+ for (outputId = 0; outputId < xf86_config->num_output; outputId++) {
|
||||
+ if (xf86_config->output[outputId] == xf86output)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ xf86output->possible_clones = 1 << outputId;
|
||||
|
||||
xwl_output->xf86output = xf86output;
|
||||
xwl_output->xf86crtc = xf86crtc;
|
||||
+ xwl_output->xf86output->crtc = xf86crtc;
|
||||
+
|
||||
+ free(name);
|
||||
|
||||
return xwl_output;
|
||||
}
|
||||
@@ -219,6 +246,32 @@ static const xf86CrtcConfigFuncsRec config_funcs = {
|
||||
resize
|
||||
};
|
||||
|
||||
+static Rotation
|
||||
+wl_transform_to_xrandr (enum wl_output_transform transform)
|
||||
+{
|
||||
+ switch (transform)
|
||||
+ {
|
||||
+ case WL_OUTPUT_TRANSFORM_NORMAL:
|
||||
+ return RR_Rotate_0;
|
||||
+ case WL_OUTPUT_TRANSFORM_90:
|
||||
+ return RR_Rotate_90;
|
||||
+ case WL_OUTPUT_TRANSFORM_180:
|
||||
+ return RR_Rotate_180;
|
||||
+ case WL_OUTPUT_TRANSFORM_270:
|
||||
+ return RR_Rotate_270;
|
||||
+ case WL_OUTPUT_TRANSFORM_FLIPPED:
|
||||
+ return RR_Reflect_X | RR_Rotate_0;
|
||||
+ case WL_OUTPUT_TRANSFORM_FLIPPED_90:
|
||||
+ return RR_Reflect_X | RR_Rotate_90;
|
||||
+ case WL_OUTPUT_TRANSFORM_FLIPPED_180:
|
||||
+ return RR_Reflect_X | RR_Rotate_180;
|
||||
+ case WL_OUTPUT_TRANSFORM_FLIPPED_270:
|
||||
+ return RR_Reflect_X | RR_Rotate_270;
|
||||
+ }
|
||||
+
|
||||
+ return RR_Rotate_0;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
display_handle_geometry(void *data, struct wl_output *wl_output, int x, int y,
|
||||
int physical_width, int physical_height, int subpixel,
|
||||
@@ -253,6 +306,7 @@ display_handle_geometry(void *data, struct wl_output *wl_output, int x, int y,
|
||||
|
||||
xwl_output->x = x;
|
||||
xwl_output->y = y;
|
||||
+ xwl_output->rotation = wl_transform_to_xrandr (transform);
|
||||
|
||||
xorg_list_append (&xwl_output->link, &xwl_screen->output_list);
|
||||
}
|
||||
@@ -262,11 +316,49 @@ display_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags,
|
||||
int width, int height, int refresh)
|
||||
{
|
||||
struct xwl_output *xwl_output = data;
|
||||
+ struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
|
||||
+ ScreenPtr pScreen = xwl_screen->screen;
|
||||
+ ScrnInfoPtr scrn = xwl_screen->scrninfo;
|
||||
+ CARD16 width_mm, height_mm;
|
||||
+ DisplayModePtr mode;
|
||||
+ rrScrPrivPtr rp;
|
||||
|
||||
- if (flags & WL_OUTPUT_MODE_CURRENT) {
|
||||
- xwl_output->width = width;
|
||||
- xwl_output->height = height;
|
||||
+ if (!(flags & WL_OUTPUT_MODE_CURRENT))
|
||||
+ return;
|
||||
+
|
||||
+ xwl_output->width = width;
|
||||
+ xwl_output->height = height;
|
||||
+
|
||||
+ if (xwl_output->x + xwl_output->width > scrn->virtualX ||
|
||||
+ xwl_output->y + xwl_output->height > scrn->virtualY) {
|
||||
+ /* Fake a RandR request to resize the screen. It will bounce
|
||||
+ back to our crtc_resize, which does nothing.
|
||||
+ */
|
||||
+ /* Preupdate virtualX / virtualY, so that crtc_resize returns TRUE */
|
||||
+ scrn->virtualX = xwl_output->x + xwl_output->width;
|
||||
+ scrn->virtualY = xwl_output->y + xwl_output->height;
|
||||
+
|
||||
+ /* Ignore the compositor provided values for mm_width/mm_height,
|
||||
+ as it doesn't make sense to sum the values of different outputs.
|
||||
+ Just make the DPI 96 */
|
||||
+ width_mm = (scrn->virtualX / 96.0) * 25.4 + 0.5;
|
||||
+ height_mm = (scrn->virtualY / 96.0) * 25.4 + 0.5;
|
||||
+
|
||||
+ /* But! When the server starts, the RandR stuff is not initialized,
|
||||
+ so we can't call rrGetScrPriv. We updated virtualX/Y anyway, let's
|
||||
+ hope it's enough.
|
||||
+ */
|
||||
+ if (xwl_screen->outputs_initialized) {
|
||||
+ rp = rrGetScrPriv(pScreen);
|
||||
+ if (rp->rrScreenSetSize)
|
||||
+ rp->rrScreenSetSize(pScreen, scrn->virtualX, scrn->virtualY, width_mm, height_mm);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ xwl_output->xf86crtc->enabled = TRUE;
|
||||
+ mode = xf86CVTMode(width, height, refresh, TRUE, FALSE);
|
||||
+ xf86CrtcSetModeTransform(xwl_output->xf86crtc, mode, xwl_output->rotation,
|
||||
+ NULL, xwl_output->x, xwl_output->y);
|
||||
}
|
||||
|
||||
static const struct wl_output_listener output_listener = {
|
||||
@@ -339,5 +431,7 @@ xwayland_screen_preinit_output(struct xwl_screen *xwl_screen, ScrnInfoPtr scrnin
|
||||
FatalError("failed to dispatch Wayland events: %s\n", strerror(errno));
|
||||
}
|
||||
|
||||
- xf86InitialConfiguration(scrninfo, TRUE);
|
||||
+ xwl_screen->outputs_initialized = TRUE;
|
||||
+
|
||||
+ xf86SetScrnInfoModes(scrninfo);
|
||||
}
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-private.h b/hw/xfree86/xwayland/xwayland-private.h
|
||||
index 7005db2..b0b2201 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-private.h
|
||||
+++ b/hw/xfree86/xwayland/xwayland-private.h
|
||||
@@ -63,6 +63,7 @@ struct xwl_screen {
|
||||
struct xorg_list window_list;
|
||||
struct xorg_list authenticate_client_list;
|
||||
uint32_t serial;
|
||||
+ Bool outputs_initialized;
|
||||
|
||||
CreateWindowProcPtr CreateWindow;
|
||||
DestroyWindowProcPtr DestroyWindow;
|
||||
@@ -82,6 +83,7 @@ struct xwl_output {
|
||||
xf86OutputPtr xf86output;
|
||||
xf86CrtcPtr xf86crtc;
|
||||
int32_t name;
|
||||
+ Rotation rotation;
|
||||
};
|
||||
|
||||
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 21d9ed2b2ad45c7c363194a4c4fe2306bb26b130 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Sun, 1 Sep 2013 23:14:43 +0200
|
||||
Subject: [PATCH 14/38] xwayland: Probe outputs on preinit
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When running xwayland, calls to xf86SetDesiredModes() would fail due to
|
||||
the probed modes list not being populated. This was previously done
|
||||
indirectly by calling xf86InitialConfiguration() and now needs to be
|
||||
done explicitly instead.
|
||||
|
||||
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-output.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-output.c b/hw/xfree86/xwayland/xwayland-output.c
|
||||
index 66c7d48..691b5f0 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-output.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-output.c
|
||||
@@ -431,6 +431,8 @@ xwayland_screen_preinit_output(struct xwl_screen *xwl_screen, ScrnInfoPtr scrnin
|
||||
FatalError("failed to dispatch Wayland events: %s\n", strerror(errno));
|
||||
}
|
||||
|
||||
+ xf86ProbeOutputModes(scrninfo, 0, 0);
|
||||
+
|
||||
xwl_screen->outputs_initialized = TRUE;
|
||||
|
||||
xf86SetScrnInfoModes(scrninfo);
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,73 +0,0 @@
|
||||
From 4e8eb23a03e14ce149e302e4dfc6e6af6fa61424 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Fri, 16 Aug 2013 13:21:21 +0100
|
||||
Subject: [PATCH 15/38] XFree86: Load wlshm driver as fallback for Wayland
|
||||
|
||||
Since fbdev or vesa are unlikely to be too useful there ...
|
||||
|
||||
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
||||
---
|
||||
hw/xfree86/common/xf86AutoConfig.c | 9 +++++++--
|
||||
hw/xfree86/common/xf86Config.c | 16 +++++++++++++---
|
||||
2 files changed, 20 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
|
||||
index af2b7f8..a3e1fa7 100644
|
||||
--- a/hw/xfree86/common/xf86AutoConfig.c
|
||||
+++ b/hw/xfree86/common/xf86AutoConfig.c
|
||||
@@ -275,10 +275,15 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
|
||||
#if !defined(sun)
|
||||
/* Fallback to platform default frame buffer driver */
|
||||
if (i < (nmatches - 1)) {
|
||||
+#ifdef XORG_WAYLAND
|
||||
+ if (xorgWayland)
|
||||
+ matches[i++] = xnfstrdup("wlshm");
|
||||
+ else
|
||||
+#endif
|
||||
#if !defined(__linux__) && defined(__sparc__)
|
||||
- matches[i++] = xnfstrdup("wsfb");
|
||||
+ matches[i++] = xnfstrdup("wsfb");
|
||||
#else
|
||||
- matches[i++] = xnfstrdup("fbdev");
|
||||
+ matches[i++] = xnfstrdup("fbdev");
|
||||
#endif
|
||||
}
|
||||
#endif /* !sun */
|
||||
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
|
||||
index 3b0bb89..aebfc1b 100644
|
||||
--- a/hw/xfree86/common/xf86Config.c
|
||||
+++ b/hw/xfree86/common/xf86Config.c
|
||||
@@ -519,7 +519,11 @@ xf86InputDriverlistFromConfig(void)
|
||||
static void
|
||||
fixup_video_driver_list(char **drivers)
|
||||
{
|
||||
- static const char *fallback[4] = { "fbdev", "vesa", "wsfb", NULL };
|
||||
+ static const char *fallback_hw[4] = { "fbdev", "vesa", "wsfb", NULL };
|
||||
+#ifdef XORG_WAYLAND
|
||||
+ static const char *fallback_wayland[2] = { "wlshm", NULL };
|
||||
+#endif
|
||||
+ const char **fallbacks;
|
||||
char **end, **drv;
|
||||
char *x;
|
||||
int i;
|
||||
@@ -532,9 +536,15 @@ fixup_video_driver_list(char **drivers)
|
||||
* for each of the fallback drivers, if we find it in the list,
|
||||
* swap it with the last available non-fallback driver.
|
||||
*/
|
||||
- for (i = 0; fallback[i]; i++) {
|
||||
+#ifdef XORG_WAYLAND
|
||||
+ if (xorgWayland)
|
||||
+ fallbacks = fallback_wl;
|
||||
+ else
|
||||
+#endif
|
||||
+ fallbacks = fallback_hw;
|
||||
+ for (i = 0; fallbacks[i]; i++) {
|
||||
for (drv = drivers; drv != end; drv++) {
|
||||
- if (strstr(*drv, fallback[i])) {
|
||||
+ if (strstr(*drv, fallbacks[i])) {
|
||||
x = *drv;
|
||||
*drv = *end;
|
||||
*end = x;
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 6cfe64769a4f8e9646e4d6766ffdf689a0963ffd Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Wed, 7 Nov 2012 17:22:42 +1100
|
||||
Subject: [PATCH 16/38] XWayland: Don't send out-of-bounds damage co-ordinates
|
||||
|
||||
Make sure we don't send damage regions larger than the buffer.
|
||||
|
||||
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
|
||||
index 2047a85..6a515f5 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland.c
|
||||
@@ -346,15 +346,14 @@ void xwl_screen_post_damage(struct xwl_screen *xwl_screen)
|
||||
|
||||
xorg_list_for_each_entry(xwl_window, &xwl_screen->damage_window_list,
|
||||
link_damage) {
|
||||
-
|
||||
region = DamageRegion(xwl_window->damage);
|
||||
count = RegionNumRects(region);
|
||||
for (i = 0; i < count; i++) {
|
||||
box = &RegionRects(region)[i];
|
||||
wl_surface_damage(xwl_window->surface,
|
||||
box->x1, box->y1,
|
||||
- box->x2 - box->x1 + 1,
|
||||
- box->y2 - box->y1 + 1);
|
||||
+ box->x2 - box->x1,
|
||||
+ box->y2 - box->y1);
|
||||
}
|
||||
wl_surface_attach(xwl_window->surface,
|
||||
xwl_window->buffer,
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,45 +0,0 @@
|
||||
From 70bf99f09cac43a9016039f762e5186c6ca2b6c6 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue, 16 Oct 2012 17:14:01 +1100
|
||||
Subject: [PATCH 17/38] xwayland: Introduce an auto mode for --enable-wayland
|
||||
|
||||
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
||||
---
|
||||
configure.ac | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8078846..c60fd44 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -629,7 +629,7 @@ AC_ARG_ENABLE(clientids, AS_HELP_STRING([--disable-clientids], [Build Xorg
|
||||
AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes])
|
||||
AC_ARG_ENABLE(linux_acpi, AC_HELP_STRING([--disable-linux-acpi], [Disable building ACPI support on Linux (if available).]), [enable_linux_acpi=$enableval], [enable_linux_acpi=yes])
|
||||
AC_ARG_ENABLE(linux_apm, AC_HELP_STRING([--disable-linux-apm], [Disable building APM support on Linux (if available).]), [enable_linux_apm=$enableval], [enable_linux_apm=yes])
|
||||
-AC_ARG_ENABLE(wayland, AS_HELP_STRING([--disable-wayland], [Build Wayland extension (default: enabled)]), [WAYLAND=$enableval], [WAYLAND=yes])
|
||||
+AC_ARG_ENABLE(wayland, AS_HELP_STRING([--disable-wayland], [Build Wayland extension (default: auto)]), [WAYLAND=$enableval], [WAYLAND=auto])
|
||||
|
||||
dnl DDXes.
|
||||
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
|
||||
@@ -1020,12 +1020,16 @@ if test "x$MITSHM" = xauto; then
|
||||
MITSHM="$ac_cv_sysv_ipc"
|
||||
fi
|
||||
|
||||
-AM_CONDITIONAL(WAYLAND, [test "x$WAYLAND" = xyes])
|
||||
+WAYLAND_MODULES="wayland-client libdrm"
|
||||
+if test "x$WAYLAND" = xauto; then
|
||||
+ PKG_CHECK_MODULES(XWAYLAND, $WAYLAND_MODULES, [WAYLAND=yes], [WAYLAND=no])
|
||||
+fi
|
||||
if test "x$WAYLAND" = xyes; then
|
||||
+ PKG_CHECK_MODULES(XWAYLAND, $WAYLAND_MODULES)
|
||||
AC_DEFINE(XORG_WAYLAND, 1, [Support wayland mode])
|
||||
- REQUIRED_MODULES="$REQUIRED_MODULES wayland-client"
|
||||
WAYLAND_SCANNER_RULES(['$(top_srcdir)/hw/xfree86/xwayland'])
|
||||
fi
|
||||
+AM_CONDITIONAL(WAYLAND, [test "x$WAYLAND" = xyes])
|
||||
|
||||
AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes])
|
||||
if test "x$MITSHM" = xyes; then
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,46 +0,0 @@
|
||||
From c7d56befef2111c82e6720643824b9a46ae36670 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Wed, 7 Nov 2012 17:15:13 +1100
|
||||
Subject: [PATCH 18/38] XWayland: Don't hardcode DRM libs and -lwayland-client
|
||||
|
||||
Take -lwayland-client from configure.ac, and only use DRM if we've
|
||||
actually asked for it.
|
||||
|
||||
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
||||
---
|
||||
hw/xfree86/xwayland/Makefile.am | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/Makefile.am b/hw/xfree86/xwayland/Makefile.am
|
||||
index b739145..22ab154 100644
|
||||
--- a/hw/xfree86/xwayland/Makefile.am
|
||||
+++ b/hw/xfree86/xwayland/Makefile.am
|
||||
@@ -7,13 +7,13 @@ AM_CPPFLAGS = \
|
||||
-I$(srcdir)/../modes
|
||||
|
||||
libxwayland_la_LTLIBRARIES = libxwayland.la
|
||||
-libxwayland_la_CFLAGS = \
|
||||
+AM_CFLAGS = \
|
||||
-DHAVE_XORG_CONFIG_H \
|
||||
- @DIX_CFLAGS@ @XORG_CFLAGS@ @LIBDRM_CFLAGS@ \
|
||||
+ @DIX_CFLAGS@ @XORG_CFLAGS@ @XWAYLAND_CFLAGS@ \
|
||||
-I$(top_srcdir)/hw/xfree86/common \
|
||||
-I$(top_srcdir)/hw/xfree86/os-support/bus
|
||||
|
||||
-libxwayland_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@ -lwayland-client
|
||||
+libxwayland_la_LDFLAGS = -module -avoid-version @XWAYLAND_LIBS@
|
||||
libxwayland_ladir = $(moduledir)/extensions
|
||||
libxwayland_la_SOURCES = \
|
||||
xwayland.c \
|
||||
@@ -28,6 +28,8 @@ libxwayland_la_SOURCES = \
|
||||
xserver-protocol.c
|
||||
|
||||
if DRM
|
||||
+AM_CFLAGS += @LIBDRM_CFLAGS@
|
||||
+libxwayland_la_LDFLAGS += @LIBDRM_LIBS@
|
||||
libxwayland_la_SOURCES += xwayland-drm.c
|
||||
endif
|
||||
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,97 +0,0 @@
|
||||
From c6da90b55546748d3f4a2f536f94751da3abcd77 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Fri, 16 Aug 2013 13:51:08 +0100
|
||||
Subject: [PATCH 19/38] XWayland: Support 16bpp X surfaces in DRM/SHM
|
||||
|
||||
Properly look at the window's visual to determine which format we should
|
||||
use for allocation.
|
||||
|
||||
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-drm.c | 12 ++++++++++--
|
||||
hw/xfree86/xwayland/xwayland.c | 38 +++++++++++++++++++++++++++++++-------
|
||||
2 files changed, 41 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-drm.c b/hw/xfree86/xwayland/xwayland-drm.c
|
||||
index 6e4c778..5250857 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-drm.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-drm.c
|
||||
@@ -225,10 +225,18 @@ xwl_create_window_buffer_drm(struct xwl_window *xwl_window,
|
||||
if (screen->visuals[i].vid == visual)
|
||||
break;
|
||||
|
||||
- if (screen->visuals[i].nplanes == 32)
|
||||
+ switch (screen->visuals[i].nplanes) {
|
||||
+ case 32:
|
||||
format = WL_DRM_FORMAT_ARGB8888;
|
||||
- else
|
||||
+ break;
|
||||
+ case 24:
|
||||
+ default:
|
||||
format = WL_DRM_FORMAT_XRGB8888;
|
||||
+ break;
|
||||
+ case 16:
|
||||
+ format = WL_DRM_FORMAT_RGB565;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
xwl_window->buffer =
|
||||
wl_drm_create_buffer(xwl_window->xwl_screen->drm,
|
||||
diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
|
||||
index 6a515f5..36f7cbf 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland.c
|
||||
@@ -277,19 +277,43 @@ xwl_create_window_buffer_shm(struct xwl_window *xwl_window,
|
||||
PixmapPtr pixmap, int fd)
|
||||
{
|
||||
struct wl_shm_pool *pool;
|
||||
- int size, stride;
|
||||
+ WindowPtr window = xwl_window->window;
|
||||
+ ScreenPtr screen = window->drawable.pScreen;
|
||||
+ VisualID visual = wVisual(window);
|
||||
+ uint32_t format;
|
||||
+ int size, stride, bpp, i;
|
||||
+
|
||||
+ for (i = 0; i < screen->numVisuals; i++)
|
||||
+ if (screen->visuals[i].vid == visual)
|
||||
+ break;
|
||||
+
|
||||
+ switch (screen->visuals[i].nplanes) {
|
||||
+ case 32:
|
||||
+ format = WL_SHM_FORMAT_ARGB8888;
|
||||
+ bpp = 4;
|
||||
+ break;
|
||||
+ case 24:
|
||||
+ default:
|
||||
+ format = WL_SHM_FORMAT_XRGB8888;
|
||||
+ bpp = 4;
|
||||
+ break;
|
||||
+#ifdef WL_SHM_FORMAT_RGB565
|
||||
+ case 16:
|
||||
+ /* XXX: Check run-time protocol version too */
|
||||
+ format = WL_SHM_FORMAT_RGB565;
|
||||
+ bpp = 2;
|
||||
+ break;
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
- stride = pixmap->drawable.width * 4;
|
||||
+ stride = pixmap->drawable.width * bpp;
|
||||
+ size = stride * pixmap->drawable.height;
|
||||
|
||||
- size = pixmap->drawable.width * pixmap->drawable.height * 4;
|
||||
pool = wl_shm_create_pool(xwl_window->xwl_screen->shm, fd, size);
|
||||
xwl_window->buffer = wl_shm_pool_create_buffer(pool, 0,
|
||||
pixmap->drawable.width,
|
||||
pixmap->drawable.height,
|
||||
- stride,
|
||||
- pixmap->drawable.depth == 32 ?
|
||||
- WL_SHM_FORMAT_ARGB8888 :
|
||||
- WL_SHM_FORMAT_XRGB8888);
|
||||
+ stride, format);
|
||||
wl_shm_pool_destroy(pool);
|
||||
|
||||
return xwl_window->buffer ? Success : BadDrawable;
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,70 +0,0 @@
|
||||
From caf0c07852843440139fcd23e621fe2e9522775f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Wed, 11 Sep 2013 11:15:18 -0700
|
||||
Subject: [PATCH 20/38] xwayland: Remove Xdnd selection watching code
|
||||
|
||||
We don't need this in the server, the wm can manage dnd proxying.
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland.c | 32 --------------------------------
|
||||
1 file changed, 32 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
|
||||
index 36f7cbf..e8c58fd 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland.c
|
||||
@@ -54,7 +54,6 @@
|
||||
*/
|
||||
|
||||
static DevPrivateKeyRec xwl_screen_private_key;
|
||||
-static Atom xdnd_atom;
|
||||
|
||||
static void
|
||||
xserver_client(void *data, struct xserver *xserver, int fd)
|
||||
@@ -178,31 +177,6 @@ xwl_screen_get(ScreenPtr screen)
|
||||
return dixLookupPrivate(&screen->devPrivates, &xwl_screen_private_key);
|
||||
}
|
||||
|
||||
-static void
|
||||
-xwayland_selection_callback(CallbackListPtr *callbacks,
|
||||
- pointer data, pointer args)
|
||||
-{
|
||||
- SelectionInfoRec *info = (SelectionInfoRec *) args;
|
||||
- Selection *selection = info->selection;
|
||||
-
|
||||
- switch (info->kind) {
|
||||
- case SelectionSetOwner:
|
||||
- if (selection->selection == xdnd_atom) {
|
||||
- if (selection->window != None)
|
||||
- ErrorF("client %p starts dnd\n", info->client);
|
||||
- else
|
||||
- ErrorF("client %p stops dnd\n", info->client);
|
||||
- }
|
||||
- break;
|
||||
- case SelectionWindowDestroy:
|
||||
- ErrorF("selection window destroy\n");
|
||||
- break;
|
||||
- case SelectionClientClose:
|
||||
- ErrorF("selection client close\n");
|
||||
- break;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
struct xwl_screen *
|
||||
xwl_screen_create(void)
|
||||
{
|
||||
@@ -231,12 +205,6 @@ xwl_screen_pre_init(ScrnInfoPtr scrninfo, struct xwl_screen *xwl_screen,
|
||||
|
||||
noScreenSaverExtension = TRUE;
|
||||
|
||||
- xdnd_atom = MakeAtom("XdndSelection", 13, 1);
|
||||
- if (!AddCallback(&SelectionCallback,
|
||||
- xwayland_selection_callback, xwl_screen)) {
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
xorg_list_init(&xwl_screen->output_list);
|
||||
xorg_list_init(&xwl_screen->seat_list);
|
||||
xorg_list_init(&xwl_screen->damage_window_list);
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,34 +0,0 @@
|
||||
From d40219f38a33845d8a9850de47ff5d458a3d8209 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 13 Sep 2013 17:17:16 -0400
|
||||
Subject: [PATCH 21/38] xf86Init: trim out non-wayland capable servers from
|
||||
drive list
|
||||
|
||||
Otherwise they'll cause the server to crash when run in wayland mode.
|
||||
---
|
||||
hw/xfree86/common/xf86Init.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
|
||||
index 2d3bb01..6282252 100644
|
||||
--- a/hw/xfree86/common/xf86Init.c
|
||||
+++ b/hw/xfree86/common/xf86Init.c
|
||||
@@ -558,6 +558,15 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
+ for (i = 0; i < xf86NumDrivers; i++) {
|
||||
+ if (xf86DriverList[i] == NULL) {
|
||||
+ for (j = i; j < xf86NumDrivers; j++) {
|
||||
+ xf86DriverList[j] = xf86DriverList[j + 1];
|
||||
+ }
|
||||
+ xf86NumDrivers--;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (xorgHWOpenConsole)
|
||||
xf86OpenConsole();
|
||||
else
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,29 +0,0 @@
|
||||
From a575da27027b91e44df75318f3b570bf8291fe7c Mon Sep 17 00:00:00 2001
|
||||
From: Giovanni Campagna <gcampagn@redhat.com>
|
||||
Date: Fri, 13 Sep 2013 15:52:29 +0200
|
||||
Subject: [PATCH 22/38] Add XORG_WAYLAND symbol to xorg-config.h.in
|
||||
|
||||
We manually duplicate symbols that we want in both xorg-server.h and
|
||||
xorg-config.h. XORG_WAYLAND is one such symbol, but it was missing from
|
||||
xorg-config.h.in.
|
||||
---
|
||||
include/xorg-config.h.in | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
|
||||
index 487d7ad..8aec1d8 100644
|
||||
--- a/include/xorg-config.h.in
|
||||
+++ b/include/xorg-config.h.in
|
||||
@@ -142,7 +142,7 @@
|
||||
/* Define to 1 if you have the `seteuid' function. */
|
||||
#undef HAVE_SETEUID
|
||||
|
||||
-/* Support APM/ACPI power management in the server */
|
||||
-#undef XF86PM
|
||||
+/* Building Xorg server. */
|
||||
+#undef XORG_WAYLAND
|
||||
|
||||
#endif /* _XORG_CONFIG_H_ */
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 7e1b4d2a4853e7a6c31e0ab0c1fe3405ec61c914 Mon Sep 17 00:00:00 2001
|
||||
From: Giovanni Campagna <gcampagn@redhat.com>
|
||||
Date: Fri, 13 Sep 2013 15:52:30 +0200
|
||||
Subject: [PATCH 23/38] Fix fallback loading of the wayland driver
|
||||
|
||||
Fix the array name to actually compile, and fix the driver name
|
||||
with the new upstream.
|
||||
---
|
||||
hw/xfree86/common/xf86AutoConfig.c | 2 +-
|
||||
hw/xfree86/common/xf86Config.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
|
||||
index a3e1fa7..51a7960 100644
|
||||
--- a/hw/xfree86/common/xf86AutoConfig.c
|
||||
+++ b/hw/xfree86/common/xf86AutoConfig.c
|
||||
@@ -277,7 +277,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
|
||||
if (i < (nmatches - 1)) {
|
||||
#ifdef XORG_WAYLAND
|
||||
if (xorgWayland)
|
||||
- matches[i++] = xnfstrdup("wlshm");
|
||||
+ matches[i++] = xnfstrdup("wayland");
|
||||
else
|
||||
#endif
|
||||
#if !defined(__linux__) && defined(__sparc__)
|
||||
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
|
||||
index aebfc1b..66f98b2 100644
|
||||
--- a/hw/xfree86/common/xf86Config.c
|
||||
+++ b/hw/xfree86/common/xf86Config.c
|
||||
@@ -521,7 +521,7 @@ fixup_video_driver_list(char **drivers)
|
||||
{
|
||||
static const char *fallback_hw[4] = { "fbdev", "vesa", "wsfb", NULL };
|
||||
#ifdef XORG_WAYLAND
|
||||
- static const char *fallback_wayland[2] = { "wlshm", NULL };
|
||||
+ static const char *fallback_wl[2] = { "wayland", NULL };
|
||||
#endif
|
||||
const char **fallbacks;
|
||||
char **end, **drv;
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,64 +0,0 @@
|
||||
From b468fcfc1733feb014ef976fef29939f9f1dfc98 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Fri, 13 Sep 2013 14:52:13 -0700
|
||||
Subject: [PATCH 24/38] xwayland: Don't include xorg-server.h
|
||||
|
||||
xorg-config.h now has the XORG_WAYLAND define.
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-cursor.c | 1 -
|
||||
hw/xfree86/xwayland/xwayland-output.c | 1 -
|
||||
hw/xfree86/xwayland/xwayland-window.c | 1 -
|
||||
hw/xfree86/xwayland/xwayland.c | 1 -
|
||||
4 files changed, 4 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-cursor.c b/hw/xfree86/xwayland/xwayland-cursor.c
|
||||
index f8860bd..1cd6457 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-cursor.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-cursor.c
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <sys/mman.h>
|
||||
#include <wayland-client.h>
|
||||
|
||||
-#include <xorg-server.h>
|
||||
#include <cursorstr.h>
|
||||
#include <xf86Crtc.h>
|
||||
#include <mipointrst.h>
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-output.c b/hw/xfree86/xwayland/xwayland-output.c
|
||||
index 691b5f0..7004b9b 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-output.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-output.c
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <sys/mman.h>
|
||||
#include <wayland-client.h>
|
||||
|
||||
-#include <xorg-server.h>
|
||||
#include <cursorstr.h>
|
||||
#include <xf86Crtc.h>
|
||||
#include <mipointrst.h>
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
|
||||
index d56e0d0..88f57ce 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-window.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-window.c
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <wayland-client.h>
|
||||
#include <X11/extensions/compositeproto.h>
|
||||
|
||||
-#include <xorg-server.h>
|
||||
#include <xf86Crtc.h>
|
||||
#include <selection.h>
|
||||
#include <compositeext.h>
|
||||
diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
|
||||
index e8c58fd..c70a52d 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland.c
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <wayland-util.h>
|
||||
#include <wayland-client.h>
|
||||
|
||||
-#include <xorg-server.h>
|
||||
#include <extinit.h>
|
||||
|
||||
#include <xf86Xinput.h>
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 6e6f302a5bfa72b195021c0053aab3286d12f87a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Fri, 13 Sep 2013 14:53:16 -0700
|
||||
Subject: [PATCH 25/38] os: Don't include xorg-server.h
|
||||
|
||||
Just always compile in ListenOnOpenFD and AddClientOnOpenFD, they
|
||||
don't depend on anything from Quartz or Wayland.
|
||||
---
|
||||
os/connection.c | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/os/connection.c b/os/connection.c
|
||||
index a95e7da..0a858b7 100644
|
||||
--- a/os/connection.c
|
||||
+++ b/os/connection.c
|
||||
@@ -64,7 +64,6 @@ SOFTWARE.
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
-#include <xorg-server.h>
|
||||
#ifdef WIN32
|
||||
#include <X11/Xwinsock.h>
|
||||
#endif
|
||||
@@ -1259,7 +1258,6 @@ MakeClientGrabPervious(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
-#if defined(XQUARTZ) || defined(XORG_WAYLAND)
|
||||
/* Add a fd (from launchd) to our listeners */
|
||||
void
|
||||
ListenOnOpenFD(int fd, int noxauth)
|
||||
@@ -1334,5 +1332,3 @@ AddClientOnOpenFD(int fd)
|
||||
return;
|
||||
}
|
||||
}
|
||||
-
|
||||
-#endif
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,30 +0,0 @@
|
||||
From 7f1df88e3c86e900fa22075aed41c5c3b3f36b75 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Fri, 13 Sep 2013 15:16:31 -0700
|
||||
Subject: [PATCH 26/38] os: Also define ListenOnOpenFD and AddClientOnOpenFD
|
||||
unconditionally
|
||||
|
||||
Remove the #ifdef from the header file as well.
|
||||
---
|
||||
include/os.h | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/os.h b/include/os.h
|
||||
index c36d09a..8deb413 100644
|
||||
--- a/include/os.h
|
||||
+++ b/include/os.h
|
||||
@@ -166,10 +166,9 @@ extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client */ );
|
||||
|
||||
extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client */ );
|
||||
|
||||
-#if defined(XQUARTZ) || defined(XORG_WAYLAND)
|
||||
extern _X_EXPORT void ListenOnOpenFD(int /* fd */ , int /* noxauth */ );
|
||||
+
|
||||
extern _X_EXPORT void AddClientOnOpenFD(int /* fd */ );
|
||||
-#endif
|
||||
|
||||
extern _X_EXPORT CARD32 GetTimeInMillis(void);
|
||||
extern _X_EXPORT CARD64 GetTimeInMicros(void);
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,26 +0,0 @@
|
||||
From b2520bd345339bbf74ab0ee4e2194206f80f4d2f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Mon, 16 Sep 2013 11:51:57 -0700
|
||||
Subject: [PATCH 27/38] xwayland: Remove unused variables
|
||||
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-window.c | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
|
||||
index 88f57ce..20db80c 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-window.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-window.c
|
||||
@@ -92,9 +92,6 @@ xwl_create_window(WindowPtr window)
|
||||
{
|
||||
ScreenPtr screen = window->drawable.pScreen;
|
||||
struct xwl_screen *xwl_screen;
|
||||
- char buffer[32];
|
||||
- int len, rc;
|
||||
- Atom name;
|
||||
Bool ret;
|
||||
|
||||
xwl_screen = xwl_screen_get(screen);
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,85 +0,0 @@
|
||||
From 2890dca70f04c3961578062207c5354d48730da3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Mon, 16 Sep 2013 12:05:19 -0700
|
||||
Subject: [PATCH 28/38] xwayland: Use a per-screen private key for cursor
|
||||
privates
|
||||
|
||||
The cursor is a per-display object, so we need to set private data on it
|
||||
using a per-screen private key to avoid stepping on privates from other
|
||||
screens.
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-cursor.c | 15 +++++++++------
|
||||
hw/xfree86/xwayland/xwayland-private.h | 2 ++
|
||||
2 files changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-cursor.c b/hw/xfree86/xwayland/xwayland-cursor.c
|
||||
index 1cd6457..2cdd248 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-cursor.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-cursor.c
|
||||
@@ -40,8 +40,6 @@
|
||||
#include "xwayland-private.h"
|
||||
#include "xserver-client-protocol.h"
|
||||
|
||||
-static DevPrivateKeyRec xwl_cursor_private_key;
|
||||
-
|
||||
static void
|
||||
expand_source_and_mask(CursorPtr cursor, void *data)
|
||||
{
|
||||
@@ -129,7 +127,8 @@ xwl_realize_cursor(DeviceIntPtr device, ScreenPtr screen, CursorPtr cursor)
|
||||
WL_SHM_FORMAT_ARGB8888);
|
||||
wl_shm_pool_destroy(pool);
|
||||
|
||||
- dixSetPrivate(&cursor->devPrivates, &xwl_cursor_private_key, buffer);
|
||||
+ dixSetPrivate(&cursor->devPrivates,
|
||||
+ &xwl_screen->cursor_private_key, buffer);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -139,8 +138,11 @@ xwl_unrealize_cursor(DeviceIntPtr device,
|
||||
ScreenPtr screen, CursorPtr cursor)
|
||||
{
|
||||
struct wl_buffer *buffer;
|
||||
+ struct xwl_screen *xwl_screen;
|
||||
|
||||
- buffer = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key);
|
||||
+ xwl_screen = xwl_screen_get(screen);
|
||||
+ buffer = dixGetPrivate(&cursor->devPrivates,
|
||||
+ &xwl_screen->cursor_private_key);
|
||||
wl_buffer_destroy(buffer);
|
||||
|
||||
return TRUE;
|
||||
@@ -155,7 +157,7 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat)
|
||||
return;
|
||||
|
||||
buffer = dixGetPrivate(&xwl_seat->x_cursor->devPrivates,
|
||||
- &xwl_cursor_private_key);
|
||||
+ &xwl_seat->xwl_screen->cursor_private_key);
|
||||
|
||||
wl_pointer_set_cursor(xwl_seat->wl_pointer,
|
||||
xwl_seat->pointer_enter_serial,
|
||||
@@ -229,7 +231,8 @@ xwl_screen_init_cursor(struct xwl_screen *xwl_screen, ScreenPtr screen)
|
||||
{
|
||||
miPointerScreenPtr pointer_priv;
|
||||
|
||||
- if (!dixRegisterPrivateKey(&xwl_cursor_private_key, PRIVATE_CURSOR, 0))
|
||||
+ if (!dixRegisterPrivateKey(&xwl_screen->cursor_private_key,
|
||||
+ PRIVATE_CURSOR, 0))
|
||||
return BadAlloc;
|
||||
|
||||
pointer_priv = dixLookupPrivate(&screen->devPrivates, miPointerScreenKey);
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-private.h b/hw/xfree86/xwayland/xwayland-private.h
|
||||
index b0b2201..aa9fc03 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-private.h
|
||||
+++ b/hw/xfree86/xwayland/xwayland-private.h
|
||||
@@ -65,6 +65,8 @@ struct xwl_screen {
|
||||
uint32_t serial;
|
||||
Bool outputs_initialized;
|
||||
|
||||
+ DevPrivateKeyRec cursor_private_key;
|
||||
+
|
||||
CreateWindowProcPtr CreateWindow;
|
||||
DestroyWindowProcPtr DestroyWindow;
|
||||
RealizeWindowProcPtr RealizeWindow;
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 1cac327a6ef9c0ca44ec32c7146da37ecb930dca Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stone <daniels@collabora.com>
|
||||
Date: Thu, 12 Sep 2013 16:58:00 -0400
|
||||
Subject: [PATCH 29/38] XWayland: Don't commit empty surfaces
|
||||
|
||||
Instead of attaching, damaging and then committing a new buffer as soon
|
||||
as we allocate a pixmap, just attach and damage the entire buffer. When
|
||||
the buffer is changed, we'll commit the changes.
|
||||
|
||||
This avoids an ugly black (on SHM) flash when a window is mapped or
|
||||
resized.
|
||||
|
||||
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-window.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
|
||||
index 20db80c..5045e65 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-window.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-window.c
|
||||
@@ -80,7 +80,6 @@ xwl_window_attach(struct xwl_window *xwl_window, PixmapPtr pixmap)
|
||||
wl_surface_damage(xwl_window->surface, 0, 0,
|
||||
pixmap->drawable.width,
|
||||
pixmap->drawable.height);
|
||||
- wl_surface_commit(xwl_window->surface);
|
||||
|
||||
callback = wl_display_sync(xwl_screen->display);
|
||||
wl_callback_add_listener(callback, &free_pixmap_listener, pixmap);
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,24 +0,0 @@
|
||||
From f3df4c8caf96cce10d7bd646f34df9c3bba4daa9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Fri, 11 Oct 2013 16:14:54 -0700
|
||||
Subject: [PATCH 30/38] xwayland: Also look for wlglamor
|
||||
|
||||
---
|
||||
hw/xfree86/common/xf86AutoConfig.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
|
||||
index 51a7960..523ddb7 100644
|
||||
--- a/hw/xfree86/common/xf86AutoConfig.c
|
||||
+++ b/hw/xfree86/common/xf86AutoConfig.c
|
||||
@@ -277,6 +277,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
|
||||
if (i < (nmatches - 1)) {
|
||||
#ifdef XORG_WAYLAND
|
||||
if (xorgWayland)
|
||||
+ matches[i++] = xnfstrdup("wlglamor");
|
||||
matches[i++] = xnfstrdup("wayland");
|
||||
else
|
||||
#endif
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,33 +0,0 @@
|
||||
From a7f4b0f1a49abdb79f7a787e582096af152382c2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Fri, 11 Oct 2013 16:29:02 -0700
|
||||
Subject: [PATCH 31/38] xwayland: Add wlglamor the right way
|
||||
|
||||
Defeated by #ifdefs.
|
||||
---
|
||||
hw/xfree86/common/xf86AutoConfig.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
|
||||
index 523ddb7..4c5d1d5 100644
|
||||
--- a/hw/xfree86/common/xf86AutoConfig.c
|
||||
+++ b/hw/xfree86/common/xf86AutoConfig.c
|
||||
@@ -274,12 +274,12 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
|
||||
|
||||
#if !defined(sun)
|
||||
/* Fallback to platform default frame buffer driver */
|
||||
- if (i < (nmatches - 1)) {
|
||||
+ if (i < (nmatches - 2)) {
|
||||
#ifdef XORG_WAYLAND
|
||||
- if (xorgWayland)
|
||||
+ if (xorgWayland) {
|
||||
matches[i++] = xnfstrdup("wlglamor");
|
||||
matches[i++] = xnfstrdup("wayland");
|
||||
- else
|
||||
+ } else
|
||||
#endif
|
||||
#if !defined(__linux__) && defined(__sparc__)
|
||||
matches[i++] = xnfstrdup("wsfb");
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,91 +0,0 @@
|
||||
From 067752476a9c2bac9e01c3c923fa94b4bf0ec0c1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Fri, 11 Oct 2013 15:41:59 -0700
|
||||
Subject: [PATCH 32/38] xwayland: Don't redirect windows, leave it to the wm
|
||||
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-window.c | 51 -----------------------------------
|
||||
1 file changed, 51 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
|
||||
index 5045e65..c03855c 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-window.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-window.c
|
||||
@@ -31,11 +31,9 @@
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
#include <wayland-client.h>
|
||||
-#include <X11/extensions/compositeproto.h>
|
||||
|
||||
#include <xf86Crtc.h>
|
||||
#include <selection.h>
|
||||
-#include <compositeext.h>
|
||||
#include <exevents.h>
|
||||
|
||||
#include "xwayland.h"
|
||||
@@ -86,49 +84,6 @@ xwl_window_attach(struct xwl_window *xwl_window, PixmapPtr pixmap)
|
||||
pixmap->refcnt++;
|
||||
}
|
||||
|
||||
-static Bool
|
||||
-xwl_create_window(WindowPtr window)
|
||||
-{
|
||||
- ScreenPtr screen = window->drawable.pScreen;
|
||||
- struct xwl_screen *xwl_screen;
|
||||
- Bool ret;
|
||||
-
|
||||
- xwl_screen = xwl_screen_get(screen);
|
||||
-
|
||||
- screen->CreateWindow = xwl_screen->CreateWindow;
|
||||
- ret = (*screen->CreateWindow)(window);
|
||||
- xwl_screen->CreateWindow = screen->CreateWindow;
|
||||
- screen->CreateWindow = xwl_create_window;
|
||||
-
|
||||
- if (!(xwl_screen->flags & XWL_FLAGS_ROOTLESS) ||
|
||||
- window->parent != NULL)
|
||||
- return ret;
|
||||
-
|
||||
- CompositeRedirectSubwindows(window, CompositeRedirectManual);
|
||||
-
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
-xwl_destroy_window (WindowPtr window)
|
||||
-{
|
||||
- ScreenPtr screen = window->drawable.pScreen;
|
||||
- struct xwl_screen *xwl_screen;
|
||||
- Bool ret;
|
||||
-
|
||||
- if (window->parent == NULL)
|
||||
- CompositeUnRedirectSubwindows (window, CompositeRedirectManual);
|
||||
-
|
||||
- xwl_screen = xwl_screen_get(screen);
|
||||
-
|
||||
- screen->DestroyWindow = xwl_screen->DestroyWindow;
|
||||
- ret = (*screen->DestroyWindow)(window);
|
||||
- xwl_screen->DestroyWindow = screen->DestroyWindow;
|
||||
- screen->DestroyWindow = xwl_destroy_window;
|
||||
-
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
static void
|
||||
damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data)
|
||||
{
|
||||
@@ -290,12 +245,6 @@ xwl_screen_init_window(struct xwl_screen *xwl_screen, ScreenPtr screen)
|
||||
if (!dixRegisterPrivateKey(&xwl_window_private_key, PRIVATE_WINDOW, 0))
|
||||
return BadAlloc;
|
||||
|
||||
- xwl_screen->CreateWindow = screen->CreateWindow;
|
||||
- screen->CreateWindow = xwl_create_window;
|
||||
-
|
||||
- xwl_screen->DestroyWindow = screen->DestroyWindow;
|
||||
- screen->DestroyWindow = xwl_destroy_window;
|
||||
-
|
||||
xwl_screen->RealizeWindow = screen->RealizeWindow;
|
||||
screen->RealizeWindow = xwl_realize_window;
|
||||
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 844a73a64081044710d2f22ba5a52513c2cce708 Mon Sep 17 00:00:00 2001
|
||||
From: Trevor McCort <tjmccort@gmail.com>
|
||||
Date: Tue, 15 Oct 2013 19:41:12 -0500
|
||||
Subject: [PATCH 33/38] xwayland: Fix hidden cursor
|
||||
|
||||
If a cursor is set when bits->emptyMask is true, the xserver
|
||||
sets a NULL cursor instead.
|
||||
|
||||
Signed-off-by: Trevor McCort <tjmccort@gmail.com>
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-cursor.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-cursor.c b/hw/xfree86/xwayland/xwayland-cursor.c
|
||||
index 2cdd248..2b3cb5e 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-cursor.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-cursor.c
|
||||
@@ -153,9 +153,16 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat)
|
||||
{
|
||||
struct wl_buffer *buffer;
|
||||
|
||||
- if (!xwl_seat->x_cursor || !xwl_seat->wl_pointer)
|
||||
+ if (!xwl_seat->wl_pointer)
|
||||
return;
|
||||
|
||||
+ if (!xwl_seat->x_cursor) {
|
||||
+ wl_pointer_set_cursor(xwl_seat->wl_pointer,
|
||||
+ xwl_seat->pointer_enter_serial,
|
||||
+ NULL, 0, 0);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
buffer = dixGetPrivate(&xwl_seat->x_cursor->devPrivates,
|
||||
&xwl_seat->xwl_screen->cursor_private_key);
|
||||
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,99 +0,0 @@
|
||||
From 3c9434f3f70420780e1fc606175a7436f6fdbb15 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Tue, 22 Oct 2013 16:50:29 +0200
|
||||
Subject: [PATCH 34/38] xkb: Repurpose XkbCopyDeviceKeymap to apply a given
|
||||
keymap to a device
|
||||
|
||||
This will also make it useful for cases when we have a new keymap to
|
||||
apply to a device but don't have a source device.
|
||||
---
|
||||
Xi/exevents.c | 2 +-
|
||||
include/xkbsrv.h | 4 ++--
|
||||
xkb/xkb.c | 2 +-
|
||||
xkb/xkbUtils.c | 14 +++++++-------
|
||||
4 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Xi/exevents.c b/Xi/exevents.c
|
||||
index 69b4038..028bdb4 100644
|
||||
--- a/Xi/exevents.c
|
||||
+++ b/Xi/exevents.c
|
||||
@@ -230,7 +230,7 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
|
||||
|
||||
mk->sourceid = device->id;
|
||||
|
||||
- if (!XkbCopyDeviceKeymap(master, device))
|
||||
+ if (!XkbDeviceApplyKeymap(master, device->key->xkbInfo->desc))
|
||||
FatalError("Couldn't pivot keymap from device to core!\n");
|
||||
}
|
||||
|
||||
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
|
||||
index bef98ef..83ee1d0 100644
|
||||
--- a/include/xkbsrv.h
|
||||
+++ b/include/xkbsrv.h
|
||||
@@ -812,8 +812,8 @@ extern _X_EXPORT void XkbSendNewKeyboardNotify(DeviceIntPtr /* kbd */ ,
|
||||
extern Bool XkbCopyKeymap(XkbDescPtr /* dst */ ,
|
||||
XkbDescPtr /* src */ );
|
||||
|
||||
-extern _X_EXPORT Bool XkbCopyDeviceKeymap(DeviceIntPtr /* dst */ ,
|
||||
- DeviceIntPtr /* src */ );
|
||||
+extern _X_EXPORT Bool XkbDeviceApplyKeymap(DeviceIntPtr /* dst */ ,
|
||||
+ XkbDescPtr /* src */ );
|
||||
|
||||
extern void XkbFilterEvents(ClientPtr /* pClient */ ,
|
||||
int /* nEvents */ ,
|
||||
diff --git a/xkb/xkb.c b/xkb/xkb.c
|
||||
index c78aceb..7a631b8 100644
|
||||
--- a/xkb/xkb.c
|
||||
+++ b/xkb/xkb.c
|
||||
@@ -5991,7 +5991,7 @@ ProcXkbGetKbdByName(ClientPtr client)
|
||||
continue;
|
||||
|
||||
if (tmpd != dev)
|
||||
- XkbCopyDeviceKeymap(tmpd, dev);
|
||||
+ XkbDeviceApplyKeymap(tmpd, xkb);
|
||||
|
||||
if (tmpd->kbdfeed && tmpd->kbdfeed->xkb_sli) {
|
||||
old_sli = tmpd->kbdfeed->xkb_sli;
|
||||
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
|
||||
index 6c6af60..1f8a839 100644
|
||||
--- a/xkb/xkbUtils.c
|
||||
+++ b/xkb/xkbUtils.c
|
||||
@@ -1999,28 +1999,28 @@ XkbCopyKeymap(XkbDescPtr dst, XkbDescPtr src)
|
||||
}
|
||||
|
||||
Bool
|
||||
-XkbCopyDeviceKeymap(DeviceIntPtr dst, DeviceIntPtr src)
|
||||
+XkbDeviceApplyKeymap(DeviceIntPtr dst, XkbDescPtr desc)
|
||||
{
|
||||
xkbNewKeyboardNotify nkn;
|
||||
Bool ret;
|
||||
|
||||
- if (!dst->key || !src->key)
|
||||
+ if (!dst->key || !desc)
|
||||
return FALSE;
|
||||
|
||||
memset(&nkn, 0, sizeof(xkbNewKeyboardNotify));
|
||||
nkn.oldMinKeyCode = dst->key->xkbInfo->desc->min_key_code;
|
||||
nkn.oldMaxKeyCode = dst->key->xkbInfo->desc->max_key_code;
|
||||
nkn.deviceID = dst->id;
|
||||
- nkn.oldDeviceID = dst->id; /* maybe src->id? */
|
||||
- nkn.minKeyCode = src->key->xkbInfo->desc->min_key_code;
|
||||
- nkn.maxKeyCode = src->key->xkbInfo->desc->max_key_code;
|
||||
+ nkn.oldDeviceID = dst->id;
|
||||
+ nkn.minKeyCode = desc->min_key_code;
|
||||
+ nkn.maxKeyCode = desc->max_key_code;
|
||||
nkn.requestMajor = XkbReqCode;
|
||||
nkn.requestMinor = X_kbSetMap; /* Near enough's good enough. */
|
||||
nkn.changed = XkbNKN_KeycodesMask;
|
||||
- if (src->key->xkbInfo->desc->geom)
|
||||
+ if (desc->geom)
|
||||
nkn.changed |= XkbNKN_GeometryMask;
|
||||
|
||||
- ret = XkbCopyKeymap(dst->key->xkbInfo->desc, src->key->xkbInfo->desc);
|
||||
+ ret = XkbCopyKeymap(dst->key->xkbInfo->desc, desc);
|
||||
if (ret)
|
||||
XkbSendNewKeyboardNotify(dst, &nkn);
|
||||
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,91 +0,0 @@
|
||||
From 260ca040db20c397af0803da5c1bf15bc3bc08f2 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Mon, 21 Oct 2013 14:41:53 +0200
|
||||
Subject: [PATCH 35/38] xkb: Factor out a function to copy a keymap's controls
|
||||
unto another
|
||||
|
||||
---
|
||||
include/xkbsrv.h | 3 +++
|
||||
xkb/xkb.c | 14 +-------------
|
||||
xkb/xkbUtils.c | 23 +++++++++++++++++++++++
|
||||
3 files changed, 27 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
|
||||
index 83ee1d0..6a2e96e 100644
|
||||
--- a/include/xkbsrv.h
|
||||
+++ b/include/xkbsrv.h
|
||||
@@ -829,6 +829,9 @@ extern void XkbFakeDeviceButton(DeviceIntPtr /* dev */ ,
|
||||
int /* press */ ,
|
||||
int /* button */ );
|
||||
|
||||
+extern _X_EXPORT void XkbCopyControls(XkbDescPtr /* dst */ ,
|
||||
+ XkbDescPtr /* src */ );
|
||||
+
|
||||
#include "xkbfile.h"
|
||||
#include "xkbrules.h"
|
||||
|
||||
diff --git a/xkb/xkb.c b/xkb/xkb.c
|
||||
index 7a631b8..6a68e81 100644
|
||||
--- a/xkb/xkb.c
|
||||
+++ b/xkb/xkb.c
|
||||
@@ -5950,25 +5950,13 @@ ProcXkbGetKbdByName(ClientPtr client)
|
||||
if (rep.loaded) {
|
||||
XkbDescPtr old_xkb;
|
||||
xkbNewKeyboardNotify nkn;
|
||||
- int i, nG, nTG;
|
||||
|
||||
old_xkb = xkb;
|
||||
xkb = new;
|
||||
dev->key->xkbInfo->desc = xkb;
|
||||
new = old_xkb; /* so it'll get freed automatically */
|
||||
|
||||
- *xkb->ctrls = *old_xkb->ctrls;
|
||||
- for (nG = nTG = 0, i = xkb->min_key_code; i <= xkb->max_key_code; i++) {
|
||||
- nG = XkbKeyNumGroups(xkb, i);
|
||||
- if (nG >= XkbNumKbdGroups) {
|
||||
- nTG = XkbNumKbdGroups;
|
||||
- break;
|
||||
- }
|
||||
- if (nG > nTG) {
|
||||
- nTG = nG;
|
||||
- }
|
||||
- }
|
||||
- xkb->ctrls->num_groups = nTG;
|
||||
+ XkbCopyControls(xkb, old_xkb);
|
||||
|
||||
nkn.deviceID = nkn.oldDeviceID = dev->id;
|
||||
nkn.minKeyCode = new->min_key_code;
|
||||
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
|
||||
index 1f8a839..6cf6e79 100644
|
||||
--- a/xkb/xkbUtils.c
|
||||
+++ b/xkb/xkbUtils.c
|
||||
@@ -2090,3 +2090,26 @@ XkbMergeLockedPtrBtns(DeviceIntPtr master)
|
||||
xkbi->lockedPtrButtons |= d->key->xkbInfo->lockedPtrButtons;
|
||||
}
|
||||
}
|
||||
+
|
||||
+void
|
||||
+XkbCopyControls(XkbDescPtr dst, XkbDescPtr src)
|
||||
+{
|
||||
+ int i, nG, nTG;
|
||||
+
|
||||
+ if (!dst || !src)
|
||||
+ return;
|
||||
+
|
||||
+ *dst->ctrls = *src->ctrls;
|
||||
+
|
||||
+ for (nG = nTG = 0, i = dst->min_key_code; i <= dst->max_key_code; i++) {
|
||||
+ nG = XkbKeyNumGroups(dst, i);
|
||||
+ if (nG >= XkbNumKbdGroups) {
|
||||
+ nTG = XkbNumKbdGroups;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (nG > nTG) {
|
||||
+ nTG = nG;
|
||||
+ }
|
||||
+ }
|
||||
+ dst->ctrls->num_groups = nTG;
|
||||
+}
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,87 +0,0 @@
|
||||
From 6240dcadc8f51b00abe7d1fc4e682b442809fb91 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Mon, 21 Oct 2013 14:41:54 +0200
|
||||
Subject: [PATCH 36/38] xwayland: Handle keymap changes
|
||||
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-input.c | 39 +++++++++++++++++++++++++++++++++---
|
||||
include/input.h | 2 +-
|
||||
2 files changed, 37 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
|
||||
index d031b34..ebf1af1 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-input.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-input.c
|
||||
@@ -143,7 +143,10 @@ xwl_keyboard_proc(DeviceIntPtr device, int what)
|
||||
switch (what) {
|
||||
case DEVICE_INIT:
|
||||
device->public.on = FALSE;
|
||||
- len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size);
|
||||
+ if (xwl_seat->keymap)
|
||||
+ len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size);
|
||||
+ else
|
||||
+ len = 0;
|
||||
if (!InitKeyboardDeviceStructFromString(device, xwl_seat->keymap,
|
||||
len,
|
||||
NULL, xwl_keyboard_control))
|
||||
@@ -453,12 +456,42 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
|
||||
uint32_t format, int fd, uint32_t size)
|
||||
{
|
||||
struct xwl_seat *xwl_seat = data;
|
||||
+ DeviceIntPtr master;
|
||||
+ XkbDescPtr xkb;
|
||||
+ XkbChangesRec changes = { 0 };
|
||||
+
|
||||
+ if (xwl_seat->keymap)
|
||||
+ munmap(xwl_seat->keymap, xwl_seat->keymap_size);
|
||||
|
||||
xwl_seat->keymap_size = size;
|
||||
xwl_seat->keymap = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
- if (xwl_seat->keymap == MAP_FAILED)
|
||||
- ; /* wah wah */
|
||||
+ if (xwl_seat->keymap == MAP_FAILED) {
|
||||
+ xwl_seat->keymap_size = 0;
|
||||
+ xwl_seat->keymap = NULL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (!xwl_seat->keyboard)
|
||||
+ goto out;
|
||||
+
|
||||
+ xkb = XkbCompileKeymapFromString(xwl_seat->keyboard, xwl_seat->keymap,
|
||||
+ strnlen(xwl_seat->keymap, xwl_seat->keymap_size));
|
||||
+ if (!xkb)
|
||||
+ goto out;
|
||||
+
|
||||
+ XkbUpdateDescActions(xkb, xkb->min_key_code, XkbNumKeys(xkb), &changes);
|
||||
+ /* Keep the current controls */
|
||||
+ XkbCopyControls(xkb, xwl_seat->keyboard->key->xkbInfo->desc);
|
||||
+
|
||||
+ XkbDeviceApplyKeymap(xwl_seat->keyboard, xkb);
|
||||
+
|
||||
+ master = GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD);
|
||||
+ if (master && master->lastSlave == xwl_seat->keyboard)
|
||||
+ XkbDeviceApplyKeymap(master, xkb);
|
||||
+
|
||||
+ XkbFreeKeyboard(xkb, XkbAllComponentsMask, TRUE);
|
||||
|
||||
+ out:
|
||||
close(fd);
|
||||
}
|
||||
|
||||
diff --git a/include/input.h b/include/input.h
|
||||
index b1cc3ff..6a814c2 100644
|
||||
--- a/include/input.h
|
||||
+++ b/include/input.h
|
||||
@@ -508,7 +508,7 @@ extern int AttachDevice(ClientPtr client,
|
||||
DeviceIntPtr slave, DeviceIntPtr master);
|
||||
|
||||
extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
|
||||
-extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
|
||||
+extern _X_EXPORT DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
|
||||
|
||||
extern _X_EXPORT int AllocDevicePair(ClientPtr client,
|
||||
const char *name,
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 408c17759542df3c906fc6fd0c01a3963ac0f345 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
|
||||
Date: Wed, 4 Dec 2013 10:27:07 -0800
|
||||
Subject: [PATCH 37/38] xwayland: Fix re-wrapping of RealizeWindow
|
||||
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-window.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
|
||||
index c03855c..ee95371 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-window.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-window.c
|
||||
@@ -110,7 +110,7 @@ xwl_realize_window(WindowPtr window)
|
||||
|
||||
screen->RealizeWindow = xwl_screen->RealizeWindow;
|
||||
ret = (*screen->RealizeWindow)(window);
|
||||
- xwl_screen->RealizeWindow = xwl_screen->RealizeWindow;
|
||||
+ xwl_screen->RealizeWindow = screen->RealizeWindow;
|
||||
screen->RealizeWindow = xwl_realize_window;
|
||||
|
||||
if (xwl_screen->flags & XWL_FLAGS_ROOTLESS) {
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -1,24 +0,0 @@
|
||||
From 76e317e6e80465ecdda849931789f1b606ff75ae Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Thu, 12 Dec 2013 09:47:12 -0500
|
||||
Subject: [PATCH 38/38] xwayland: Adapt to 1.15 Damage API
|
||||
|
||||
---
|
||||
hw/xfree86/xwayland/xwayland-window.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
|
||||
index ee95371..9a6724e 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-window.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-window.c
|
||||
@@ -190,7 +190,6 @@ xwl_unrealize_window(WindowPtr window)
|
||||
xorg_list_del(&xwl_window->link);
|
||||
if (RegionNotEmpty(DamageRegion(xwl_window->damage)))
|
||||
xorg_list_del(&xwl_window->link_damage);
|
||||
- DamageUnregister(&window->drawable, xwl_window->damage);
|
||||
DamageDestroy(xwl_window->damage);
|
||||
free(xwl_window);
|
||||
dixSetPrivate(&window->devPrivates, &xwl_window_private_key, NULL);
|
||||
--
|
||||
1.8.4.2
|
||||
|
67
Xorg.wrap.man
Normal file
67
Xorg.wrap.man
Normal file
@ -0,0 +1,67 @@
|
||||
.\" Xwrapper.wrap.1
|
||||
.\"
|
||||
.\" Copyright 2014 Red Hat, Inc.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, distribute, and sell this software and its
|
||||
.\" documentation for any purpose is hereby granted without fee, provided that
|
||||
.\" the above copyright notice appear in all copies and that both that
|
||||
.\" copyright notice and this permission notice appear in supporting
|
||||
.\" documentation.
|
||||
.\"
|
||||
.\" The above copyright notice and this permission notice shall be included
|
||||
.\" in all copies or substantial portions of the Software.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
.\" OTHER DEALINGS IN THE SOFTWARE.
|
||||
.\"
|
||||
.\" Except as contained in this notice, the name of The Open Group shall
|
||||
.\" not be used in advertising or otherwise to promote the sale, use or
|
||||
.\" other dealings in this Software without prior written authorization
|
||||
.\" from The Open Group.
|
||||
.\"
|
||||
.\" shorthand for double quote that works everywhere.
|
||||
.ds q \N'34'
|
||||
.TH Xorg.wrap 1 __xorgversion__
|
||||
.SH NAME
|
||||
Xorg.wrap \- Xorg X server binary wrapper
|
||||
.SH DESCRIPTION
|
||||
The Xorg X server may need root rights to function properly. To start the
|
||||
Xorg X server with these rights your system is using a suid root wrapper
|
||||
installed as __suid_wrapper_dir__/Xorg.wrap which will execute the real
|
||||
X server which is installed as __suid_wrapper_dir__/Xorg.bin .
|
||||
.PP
|
||||
By default Xorg.wrap will autodetect if root rights are necessary, and
|
||||
if not it will drop its elevated rights before starting the real X server.
|
||||
By default Xorg.wrap will only allow executing the real X server from login
|
||||
sessions on a physical console.
|
||||
|
||||
.SH CONFIG FILE
|
||||
Xorg.wrap's default behavior can be overridden from the
|
||||
\fI__sysconfdir__/X11/Xwrapper.config\fP config file. Lines starting with a
|
||||
\fB#\fP in Xwrapper.config are considered comments and will be ignored. Any
|
||||
other non empty lines must take the form of \fBkey\fP = \fIvalue\fP.
|
||||
.TP 8
|
||||
\fBallowed_users\fP = \fIrootonly\fP|\fIconsole\fP|\fIanybody\fP
|
||||
Specify which users may start the X server through the wrapper. Use
|
||||
\fIrootonly\fP to only allow root, use \fIconsole\fP to only allow users
|
||||
logged into a physical console, and use \fIanybody\fP to allow anybody.
|
||||
The default is \fIconsole\fP.
|
||||
.TP 8
|
||||
\fBneeds_root_rights\fP = \fIyes\fP|\fIno\fP|\fIauto\fP
|
||||
Configure if the wrapper should drop its elevated (root) rights before starting
|
||||
the X server. Use \fIyes\fP to force execution as root, \fIno\fP to force
|
||||
execution with all suid rights dropped, and \fIauto\fP to letter the wrapper
|
||||
auto-detect. The default is \fIauto\fP.
|
||||
.PP
|
||||
When auto-detecting the wrapper will drop rights if kms graphics are available
|
||||
and not drop them if no kms graphics are detected. If a system has multiple
|
||||
graphics cards and some are not kms capable auto-detection may fail,
|
||||
in this case manual configuration should be used.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
Xorg X server information: \fIXorg\fP(1)
|
1
Xwrapper.config.man
Normal file
1
Xwrapper.config.man
Normal file
@ -0,0 +1 @@
|
||||
.so man1/Xorg.wrap.1
|
@ -16,9 +16,9 @@
|
||||
# source because rpm is a terrible language.
|
||||
%global ansic_major 0
|
||||
%global ansic_minor 4
|
||||
%global videodrv_major 15
|
||||
%global videodrv_major 17
|
||||
%global videodrv_minor 0
|
||||
%global xinput_major 20
|
||||
%global xinput_major 21
|
||||
%global xinput_minor 0
|
||||
%global extension_major 8
|
||||
%global extension_minor 0
|
||||
@ -41,8 +41,8 @@
|
||||
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.15.0
|
||||
Release: 5%{?gitdate:.%{gitdate}}%{dist}
|
||||
Version: 1.15.99.902
|
||||
Release: 1%{?gitdate:.%{gitdate}}%{dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
@ -74,60 +74,9 @@ Source31: xserver-sdk-abi-requires.git
|
||||
# maintainer convenience script
|
||||
Source40: driver-abi-rebuild.sh
|
||||
|
||||
# xwayland. trivial rebase onto master:
|
||||
# http://cgit.freedesktop.org/~ajax/xserver/log/?h=wayland-f21
|
||||
Patch0101: 0001-dbe-Cleanup-in-CloseScreen-hook-not-ext-CloseDown.patch
|
||||
Patch0102: 0002-xkb-Add-struct-XkbCompContext.patch
|
||||
Patch0103: 0003-xkb-Split-out-code-to-start-and-finish-xkbcomp.patch
|
||||
Patch0104: 0004-xkb-Add-XkbCompileKeymapFromString.patch
|
||||
Patch0105: 0005-os-Add-a-function-to-create-a-client-for-an-fd.patch
|
||||
Patch0106: 0006-Export-xf86NewInputDevice-and-xf86AllocateInput.patch
|
||||
Patch0107: 0007-Add-redirect-window-for-input-device-feature.patch
|
||||
Patch0108: 0008-dri2-Introduce-a-third-version-of-the-AuthMagic-func.patch
|
||||
Patch0109: 0009-Add-xwayland-module.patch
|
||||
Patch0110: 0010-xwayland-Add-a-HW_WAYLAND-flag-to-let-drivers-explic.patch
|
||||
Patch0111: 0011-xwayland-shm-don-t-create-alpha-buffers-if-the-windo.patch
|
||||
Patch0112: 0012-xwayland-handle-global-object-destruction.patch
|
||||
Patch0113: 0013-xwayland-add-support-for-multiple-outputs.patch
|
||||
Patch0114: 0014-xwayland-Probe-outputs-on-preinit.patch
|
||||
Patch0115: 0015-XFree86-Load-wlshm-driver-as-fallback-for-Wayland.patch
|
||||
Patch0116: 0016-XWayland-Don-t-send-out-of-bounds-damage-co-ordinate.patch
|
||||
Patch0117: 0017-xwayland-Introduce-an-auto-mode-for-enable-wayland.patch
|
||||
Patch0118: 0018-XWayland-Don-t-hardcode-DRM-libs-and-lwayland-client.patch
|
||||
Patch0119: 0019-XWayland-Support-16bpp-X-surfaces-in-DRM-SHM.patch
|
||||
Patch0120: 0020-xwayland-Remove-Xdnd-selection-watching-code.patch
|
||||
Patch0121: 0021-xf86Init-trim-out-non-wayland-capable-servers-from-d.patch
|
||||
Patch0122: 0022-Add-XORG_WAYLAND-symbol-to-xorg-config.h.in.patch
|
||||
Patch0123: 0023-Fix-fallback-loading-of-the-wayland-driver.patch
|
||||
Patch0124: 0024-xwayland-Don-t-include-xorg-server.h.patch
|
||||
Patch0125: 0025-os-Don-t-include-xorg-server.h.patch
|
||||
Patch0126: 0026-os-Also-define-ListenOnOpenFD-and-AddClientOnOpenFD-.patch
|
||||
Patch0127: 0027-xwayland-Remove-unused-variables.patch
|
||||
Patch0128: 0028-xwayland-Use-a-per-screen-private-key-for-cursor-pri.patch
|
||||
Patch0129: 0029-XWayland-Don-t-commit-empty-surfaces.patch
|
||||
Patch0130: 0030-xwayland-Also-look-for-wlglamor.patch
|
||||
Patch0131: 0031-xwayland-Add-wlglamor-the-right-way.patch
|
||||
Patch0132: 0032-xwayland-Don-t-redirect-windows-leave-it-to-the-wm.patch
|
||||
Patch0133: 0033-xwayland-Fix-hidden-cursor.patch
|
||||
Patch0134: 0034-xkb-Repurpose-XkbCopyDeviceKeymap-to-apply-a-given-k.patch
|
||||
Patch0135: 0035-xkb-Factor-out-a-function-to-copy-a-keymap-s-control.patch
|
||||
Patch0136: 0036-xwayland-Handle-keymap-changes.patch
|
||||
Patch0137: 0037-xwayland-Fix-re-wrapping-of-RealizeWindow.patch
|
||||
Patch0138: 0038-xwayland-Adapt-to-1.15-Damage-API.patch
|
||||
# restore ABI
|
||||
Patch0200: 0001-mustard-Restore-XkbCopyDeviceKeymap.patch
|
||||
# Submitted upstream: http://lists.freedesktop.org/archives/wayland-devel/2014-February/013218.html
|
||||
# but likely to be rendered irrelevant by pending present support:
|
||||
# http://lists.freedesktop.org/archives/wayland-devel/2014-February/013219.html
|
||||
# and queried as to correctness:
|
||||
# http://lists.freedesktop.org/archives/wayland-devel/2014-February/013227.html
|
||||
# so may wind up never being merged. View with concern. Adding just because
|
||||
# even this imperfect patch is probably better than XWayland being entirely
|
||||
# busted in Rawhide:
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=724443
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1065109
|
||||
# - adamw 2014/02
|
||||
Patch0201: xwayland_destroy_wl_buffers.patch
|
||||
# workaround for make dist bug in 1.15.99.902, remove once fixed
|
||||
Source50: Xorg.wrap.man
|
||||
Source51: Xwrapper.config.man
|
||||
|
||||
# Trivial things to never merge upstream ever:
|
||||
# This really could be done prettier.
|
||||
@ -146,17 +95,11 @@ Patch7027: xserver-autobind-hotplug.patch
|
||||
Patch8040: 0001-rrcrtc-brackets-are-hard-lets-go-shopping.patch
|
||||
Patch8041: 0001-pixmap-fix-reverse-optimus-support-with-multiple-hea.patch
|
||||
|
||||
# extra magic to be upstreamed
|
||||
Patch9001: 0001-xfree86-Only-look-at-wayland-capable-drivers-when-wa.patch
|
||||
Patch9002: 0001-xwayland-Just-send-the-bounding-box-of-the-damage.patch
|
||||
|
||||
# submitted: http://lists.x.org/archives/xorg-devel/2013-October/037996.html
|
||||
Patch9100: exa-only-draw-valid-trapezoids.patch
|
||||
|
||||
# in pull request http://patchwork.freedesktop.org/patch/19468/
|
||||
Patch9103: 0001-dix-fix-button-state-check-before-changing-a-button-.patch
|
||||
|
||||
Patch9104: 0001-config-search-for-PnPID-on-all-parents-75513.patch
|
||||
# because the display-managers are not ready yet, do not upstream
|
||||
Patch10000: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch
|
||||
|
||||
%global moduledir %{_libdir}/xorg/modules
|
||||
%global drimoduledir %{_libdir}/dri
|
||||
@ -186,7 +129,7 @@ BuildRequires: git-core
|
||||
BuildRequires: automake autoconf libtool pkgconfig
|
||||
BuildRequires: xorg-x11-util-macros >= 1.17
|
||||
|
||||
BuildRequires: xorg-x11-proto-devel >= 7.7-8
|
||||
BuildRequires: xorg-x11-proto-devel >= 7.7-10
|
||||
BuildRequires: xorg-x11-font-utils >= 7.2-11
|
||||
|
||||
BuildRequires: xorg-x11-xtrans-devel >= 1.3.2
|
||||
@ -200,7 +143,7 @@ BuildRequires: libXt-devel libdmx-devel libXmu-devel libXrender-devel
|
||||
BuildRequires: libXi-devel libXpm-devel libXaw-devel libXfixes-devel
|
||||
|
||||
%if !0%{?rhel}
|
||||
BuildRequires: wayland-devel pkgconfig(wayland-client)
|
||||
BuildRequires: wayland-devel pkgconfig(wayland-client) pkgconfig(epoxy)
|
||||
BuildRequires: pkgconfig(xshmfence) >= 1.1
|
||||
%endif
|
||||
BuildRequires: libXv-devel
|
||||
@ -229,6 +172,7 @@ BuildRequires: pkgconfig(xcb-keysyms)
|
||||
%description
|
||||
X.Org X11 X server
|
||||
|
||||
|
||||
%package common
|
||||
Summary: Xorg server common files
|
||||
Group: User Interface/X
|
||||
@ -238,12 +182,16 @@ Requires: xkeyboard-config xkbcomp
|
||||
%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
|
||||
# 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}
|
||||
@ -256,12 +204,6 @@ 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
|
||||
%if !0%{?rhel}
|
||||
# this is expected to be temporary, since eventually it will be implied by
|
||||
# the server version. the serial number here is just paranoia in case we
|
||||
# need to do something lockstep between now and upstream merge
|
||||
Provides: xserver-abi(xwayland) = 1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} > 17
|
||||
# Dropped from F18, use a video card instead
|
||||
@ -272,7 +214,6 @@ Obsoletes: xorg-x11-drv-s3 <= 0.6.3-14.fc17
|
||||
Obsoletes: xorg-x11-drv-tseng <= 1.2.4-12.fc17
|
||||
%endif
|
||||
|
||||
|
||||
Requires: xorg-x11-server-common >= %{version}-%{release}
|
||||
Requires: system-setup-keyboard
|
||||
|
||||
@ -297,6 +238,7 @@ 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
|
||||
@ -313,6 +255,7 @@ 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
|
||||
@ -348,6 +291,17 @@ X protocol, and therefore supports the newer X extensions like
|
||||
Render and Composite.
|
||||
|
||||
|
||||
%if !0%{?rhel}
|
||||
%package Xwayland
|
||||
Summary: Wayland X Sserver.
|
||||
Group: User Interface/X
|
||||
Requires: xorg-x11-server-common >= %{version}-%{release}
|
||||
|
||||
%description Xwayland
|
||||
Xwayland is an X server for running X clients under Wayland.
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with_hw_servers}
|
||||
%package devel
|
||||
Summary: SDK for X server driver module development
|
||||
@ -357,7 +311,6 @@ Requires: xorg-x11-proto-devel
|
||||
Requires: pkgconfig pixman-devel libpciaccess-devel
|
||||
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
|
||||
@ -365,6 +318,7 @@ outside of the standard X11 source code tree. Developers writing video
|
||||
drivers, input drivers, or other X modules should install this package.
|
||||
%endif
|
||||
|
||||
|
||||
%package source
|
||||
Summary: Xserver source code required to build VNC server (Xvnc)
|
||||
Group: Development/Libraries
|
||||
@ -373,6 +327,7 @@ BuildArch: noarch
|
||||
%description source
|
||||
Xserver source code needed to build VNC server (Xvnc)
|
||||
|
||||
|
||||
%prep
|
||||
#setup -q -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
|
||||
%setup -q -n %{pkgname}-%{version}
|
||||
@ -396,6 +351,9 @@ git add .
|
||||
git commit -a -q -m "%{version} baseline."
|
||||
%endif
|
||||
|
||||
# workaround for make dist bug in 1.15.99.902, remove once fixed
|
||||
cp %{SOURCE50} %{SOURCE51} hw/xfree86/man
|
||||
|
||||
# Apply all the patches.
|
||||
git am -p1 %{patches} < /dev/null
|
||||
|
||||
@ -427,14 +385,14 @@ test `getminor extension` == %{extension_minor}
|
||||
%global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins"
|
||||
|
||||
%if %{with_hw_servers}
|
||||
%global dri_flags --with-dri-driver-path=%{drimoduledir} --enable-dri2 %{?!rhel:--enable-dri3}
|
||||
%global dri_flags --with-dri-driver-path=%{drimoduledir} --enable-dri2 %{?!rhel:--enable-dri3} --enable-suid-wrapper
|
||||
%else
|
||||
%global dri_flags --disable-dri
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora}
|
||||
%global bodhi_flags --with-vendor-name="Fedora Project"
|
||||
%global wayland --with-wayland
|
||||
%global wayland --enable-xwayland
|
||||
%endif
|
||||
|
||||
# ick
|
||||
@ -461,15 +419,16 @@ autoreconf -f -v --install || exit 1
|
||||
--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}
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT moduledir=%{moduledir}
|
||||
%make_install moduledir=%{moduledir}
|
||||
|
||||
%if %{with_hw_servers}
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/xorg/modules/multimedia/
|
||||
@ -537,12 +496,8 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
||||
%endif
|
||||
}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files common
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING
|
||||
%{_mandir}/man1/Xserver.1*
|
||||
%{_libdir}/xorg/protocol.txt
|
||||
@ -558,10 +513,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%if %{with_hw_servers}
|
||||
%files Xorg
|
||||
%defattr(-,root,root,-)
|
||||
%config %attr(0644,root,root) %{_sysconfdir}/pam.d/xserver
|
||||
%{_bindir}/X
|
||||
%{Xorgperms} %{_bindir}/Xorg
|
||||
%{_bindir}/Xorg
|
||||
%{_libexecdir}/Xorg.bin
|
||||
%{Xorgperms} %{_libexecdir}/Xorg.wrap
|
||||
%{_bindir}/cvt
|
||||
%{_bindir}/gtf
|
||||
%dir %{_libdir}/xorg
|
||||
@ -569,9 +525,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%dir %{_libdir}/xorg/modules/drivers
|
||||
%dir %{_libdir}/xorg/modules/extensions
|
||||
%{_libdir}/xorg/modules/extensions/libglx.so
|
||||
%if !0%{?rhel}
|
||||
%{_libdir}/xorg/modules/extensions/libxwayland.so
|
||||
%endif
|
||||
%dir %{_libdir}/xorg/modules/input
|
||||
%{_libdir}/xorg/modules/libfbdevhw.so
|
||||
%{_libdir}/xorg/modules/libexa.so
|
||||
@ -586,9 +539,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%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}/man5/Xwrapper.config.5*
|
||||
%{_mandir}/man5/xorg.conf.5*
|
||||
%{_mandir}/man5/xorg.conf.d.5*
|
||||
%dir %{_sysconfdir}/X11/xorg.conf.d
|
||||
@ -599,12 +554,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files Xnest
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/Xnest
|
||||
%{_mandir}/man1/Xnest.1*
|
||||
|
||||
%files Xdmx
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/Xdmx
|
||||
%{_bindir}/dmxaddinput
|
||||
%{_bindir}/dmxaddscreen
|
||||
@ -623,22 +576,20 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/xdmxconfig.1*
|
||||
|
||||
%files Xvfb
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/Xvfb
|
||||
%{_bindir}/xvfb-run
|
||||
%{_mandir}/man1/Xvfb.1*
|
||||
|
||||
|
||||
%files Xephyr
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/Xephyr
|
||||
%{_mandir}/man1/Xephyr.1*
|
||||
|
||||
%files Xwayland
|
||||
%{_bindir}/Xwayland
|
||||
|
||||
%if %{with_hw_servers}
|
||||
%files devel
|
||||
%doc COPYING
|
||||
%defattr(-,root,root,-)
|
||||
#{_docdir}/xorg-server
|
||||
%{_bindir}/xserver-sdk-abi-requires
|
||||
%{_libdir}/pkgconfig/xorg-server.pc
|
||||
@ -647,12 +598,17 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/aclocal/xorg-server.m4
|
||||
%endif
|
||||
|
||||
|
||||
%files source
|
||||
%defattr(-, root, root, -)
|
||||
%{xserver_source_dir}
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Apr 17 2014 Hans de Goede <hdegoede@redhat.com> - 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 <peter.hutterer@redhat.com> 1.15.0-5
|
||||
- Search all parent devices for a PnPID.
|
||||
|
||||
|
@ -26,7 +26,7 @@ index 0590262..d246634 100644
|
||||
+/* let clients know they can use this */
|
||||
+#define XF86_SCRN_HAS_PREFER_CLONE 1
|
||||
+
|
||||
typedef pointer (*funcPointer) (void);
|
||||
typedef void *(*funcPointer) (void);
|
||||
|
||||
/* flags for depth 24 pixmap options */
|
||||
@@ -769,6 +772,9 @@ typedef struct _ScrnInfoRec {
|
||||
|
@ -1,62 +0,0 @@
|
||||
From abdbfba12e439d6c27156b1f4a773d68337e30c0 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Tue, 11 Feb 2014 16:34:13 +0200
|
||||
Subject: [PATCH] xwayland: Destroy wl_buffers only after they are released
|
||||
|
||||
Destroying a wl_buffer that is still attached to a wl_surface is
|
||||
undefined behavior according to the wayland protocol. We should delay
|
||||
the destruction until we get the release event.
|
||||
---
|
||||
|
||||
So, I'm not sure why there was this comment saying that it was safe to
|
||||
do this, perhaps it was in an old protocol version?
|
||||
|
||||
In any case, this has been making xwayland crash under mutter ever
|
||||
since this mutter commit
|
||||
https://git.gnome.org/browse/mutter/commit/?h=wayland&id=3e98ffaf9958366b584b360ac12bbc03cd070c07 .
|
||||
|
||||
hw/xfree86/xwayland/xwayland-window.c | 16 ++++++++++++----
|
||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
|
||||
index a2a8206..a005cc6 100644
|
||||
--- a/hw/xfree86/xwayland/xwayland-window.c
|
||||
+++ b/hw/xfree86/xwayland/xwayland-window.c
|
||||
@@ -43,6 +43,16 @@
|
||||
static DevPrivateKeyRec xwl_window_private_key;
|
||||
|
||||
static void
|
||||
+free_buffer(void *data, struct wl_buffer *buffer)
|
||||
+{
|
||||
+ wl_buffer_destroy(buffer);
|
||||
+}
|
||||
+
|
||||
+static const struct wl_buffer_listener buffer_listener = {
|
||||
+ free_buffer,
|
||||
+};
|
||||
+
|
||||
+static void
|
||||
free_pixmap(void *data, struct wl_callback *callback, uint32_t time)
|
||||
{
|
||||
PixmapPtr pixmap = data;
|
||||
@@ -62,10 +72,8 @@ xwl_window_attach(struct xwl_window *xwl_window, PixmapPtr pixmap)
|
||||
struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
|
||||
struct wl_callback *callback;
|
||||
|
||||
- /* We can safely destroy the buffer because we only use one buffer
|
||||
- * per surface in xwayland model */
|
||||
if (xwl_window->buffer)
|
||||
- wl_buffer_destroy(xwl_window->buffer);
|
||||
+ wl_buffer_add_listener(xwl_window->buffer, &buffer_listener, NULL);
|
||||
|
||||
xwl_screen->driver->create_window_buffer(xwl_window, pixmap);
|
||||
|
||||
@@ -185,7 +193,7 @@ xwl_unrealize_window(WindowPtr window)
|
||||
return ret;
|
||||
|
||||
if (xwl_window->buffer)
|
||||
- wl_buffer_destroy(xwl_window->buffer);
|
||||
+ wl_buffer_add_listener(xwl_window->buffer, &buffer_listener, NULL);
|
||||
wl_surface_destroy(xwl_window->surface);
|
||||
xorg_list_del(&xwl_window->link);
|
||||
if (RegionNotEmpty(DamageRegion(xwl_window->damage)))
|
Loading…
Reference in New Issue
Block a user