[mutter] wayland-surface: Don't crash if clients commit to a done popup
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland-surface: Don't crash if clients commit to a done popup
- Date: Wed, 5 Aug 2015 11:51:34 +0000 (UTC)
commit ab9dabe7251deeafdd2bff13a22f123df528c5cb
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Aug 3 16:09:33 2015 +0200
wayland-surface: Don't crash if clients commit to a done popup
If we can't put up a popup because grabbing the pointer fails we
immediately dismiss the popup but the client might have made requests
already, in particular it might have commited the surface and in that
case we should ignore it.
https://bugzilla.gnome.org/show_bug.cgi?id=753237
src/wayland/meta-wayland-surface.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index e4a4e5a..ef9edf6 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -256,6 +256,12 @@ toplevel_surface_commit (MetaWaylandSurface *surface,
return;
}
}
+ else if (surface->role == META_WAYLAND_SURFACE_ROLE_XDG_POPUP)
+ {
+ /* Ignore commits if we couldn't grab the pointer */
+ if (!window)
+ return;
+ }
else
{
if (surface->buffer == NULL)
@@ -268,6 +274,8 @@ toplevel_surface_commit (MetaWaylandSurface *surface,
}
}
+ g_assert (window != NULL);
+
/* We resize X based surfaces according to X events */
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]