summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2016-09-21 14:45:51 +0800
committerJonas Ådahl <jadahl@gmail.com>2016-10-19 17:03:27 +0800
commitab21c3cad7065670dc9190c5d700866d3d5f05e5 (patch)
tree70e4a079684b775815d45767fb87bff6a39aade5 /src
parent20efdfcb41e096586505bd9c2494d8780a5fdafe (diff)
downloadmutter-ab21c3cad7065670dc9190c5d700866d3d5f05e5.tar.gz
MetaWaylandPopup: Dismiss popup when grab is cancelled
Dismiss the popup when the grab is cancelled, so that if the grab is ended for whatever reason (such as VT switching or the last pointer being disconnected), it doesn't try to end the grab when it isn't active. This fixes a crash when VT switching back and forth while a popup grab is active. https://bugzilla.gnome.org/show_bug.cgi?id=771858
Diffstat (limited to 'src')
-rw-r--r--src/wayland/meta-wayland-popup.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wayland/meta-wayland-popup.c b/src/wayland/meta-wayland-popup.c
index f9141dd06..1b36d00ff 100644
--- a/src/wayland/meta-wayland-popup.c
+++ b/src/wayland/meta-wayland-popup.c
@@ -141,10 +141,17 @@ popup_grab_button (MetaWaylandPointerGrab *grab,
meta_wayland_pointer_end_popup_grab (grab->pointer);
}
+static void
+popup_grab_cancel (MetaWaylandPointerGrab *grab)
+{
+ meta_wayland_pointer_end_popup_grab (grab->pointer);
+}
+
static MetaWaylandPointerGrabInterface popup_grab_interface = {
popup_grab_focus,
popup_grab_motion,
- popup_grab_button
+ popup_grab_button,
+ popup_grab_cancel
};
MetaWaylandPopupGrab *