xserver: Branch 'master' - 3 commits
Adam Jackson
ajax at kemper.freedesktop.org
Mon Jun 13 20:10:21 UTC 2016
hw/xwayland/xwayland-cursor.c | 15 +++++++++++++++
hw/xwayland/xwayland-input.c | 4 ++++
randr/rrscreen.c | 3 +++
3 files changed, 22 insertions(+)
New commits:
commit edd24aa50b17849b904a3ac5429e333bac9bac9c
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Mon Jun 6 09:22:28 2016 +0200
wayland: clear resource for pixmap on unrealize
On cursor unrealize, the associated pixmap is destroyed, make sure we
clear the pointer from the private resource and check for the value
being non-null when setting or destroying the cursor.
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96246
diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
index 76729db..74dfe4e 100644
--- a/hw/xwayland/xwayland-cursor.c
+++ b/hw/xwayland/xwayland-cursor.c
@@ -76,8 +76,20 @@ static Bool
xwl_unrealize_cursor(DeviceIntPtr device, ScreenPtr screen, CursorPtr cursor)
{
PixmapPtr pixmap;
+ struct xwl_seat *xwl_seat;
pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key);
+ if (!pixmap)
+ return TRUE;
+
+ dixSetPrivate(&cursor->devPrivates, &xwl_cursor_private_key, NULL);
+
+ /* When called from FreeCursor(), device is always NULL */
+ if (device) {
+ xwl_seat = device->public.devicePrivate;
+ if (xwl_seat && cursor == xwl_seat->x_cursor)
+ xwl_seat->x_cursor = NULL;
+ }
return xwl_shm_destroy_pixmap(pixmap);
}
@@ -122,6 +134,9 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat)
cursor = xwl_seat->x_cursor;
pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key);
+ if (!pixmap)
+ return;
+
stride = cursor->bits->width * 4;
if (cursor->bits->argb)
memcpy(pixmap->devPrivate.ptr,
commit 941aeb3b92e644923bd112eef8023f033a140ee6
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Fri May 13 08:58:58 2016 +0200
randr: Do not update ConnectionInfo if NULL
RRScreenSizeNotify() will update the connection information block, but
if this occurs during initialization before ConnectionInfo is even
initialized, this will lead to a crash.
Simply check for ConnectionInfo prior to update it to avoid the crash.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index d0ca91e..b5e2090 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -41,6 +41,9 @@ RREditConnectionInfo(ScreenPtr pScreen)
int screen = 0;
int d;
+ if (ConnectionInfo == NULL)
+ return;
+
connSetup = (xConnSetup *) ConnectionInfo;
vendor = (char *) connSetup + sizeof(xConnSetup);
formats = (xPixmapFormat *) ((char *) vendor +
commit 6a6bbc3b756706bdade01434f1ee8d8cbe7dd854
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Thu May 12 14:51:51 2016 +0200
xwayland: Restore wl_display_roundtrip() in InitInput
This partially revert commit 984be78
The rountrip in Xwayland's InitInput() is unlikely the culprit for the
crash reported in bug 95337, even though it's triggered from
InitInput().
Startup goes like this:
xwl_screen_init()
xwl_output_create()
wl_display_roundtrip()
InitInput()
wl_display_roundtrip()
ConnectionInfo initialized
What happens in bug 95337 is that some output data is already available
when we reach InitInput()'s wl_display_roundtrip() and therefore we end
up trying to update the ConnectionInfo's data from RR routines before
ConnectionInfo is actually initialized.
Removing the wl_display_roundtrip() from InitInput() will not fix the
issue (although it would make it less lileky to happen), because
xwl_screen_init() also does a wl_display_roundtrip() after creating the
output, so the race that led to bug 95337 remains.
However, re-setting the xwl_screen->expecting_event to 0 again in
InitInput() still doesn't seem right. so this part is not restored
(thus a partial revert).
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 16e7155..0735d43 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -969,6 +969,10 @@ InitInput(int argc, char *argv[])
xwl_screen->input_registry = wl_display_get_registry(xwl_screen->display);
wl_registry_add_listener(xwl_screen->input_registry, &input_listener,
xwl_screen);
+
+ wl_display_roundtrip(xwl_screen->display);
+ while (xwl_screen->expecting_event)
+ wl_display_roundtrip(xwl_screen->display);
}
void
More information about the xorg-commit
mailing list