[gtk/wip/muktupavels/fix-critical-warning-master] menu: fix critical warning
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/muktupavels/fix-critical-warning-master] menu: fix critical warning
- Date: Thu, 14 Nov 2019 17:06:09 +0000 (UTC)
commit cfdc6019cbdf72cc77eb90d5e512c52a5c96f315
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Nov 14 18:02:36 2019 +0200
menu: fix critical warning
Unset gdk-attached-grab-window from correct surface.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1899
gtk/gtkmenu.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index c95036fdd1..e16916a8fe 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2068,16 +2068,19 @@ menu_grab_transfer_surface_get (GtkMenu *menu)
static void
menu_grab_transfer_surface_destroy (GtkMenu *menu)
{
+ GtkMenuPrivate *priv = menu->priv;
GdkSurface *surface = g_object_get_data (G_OBJECT (menu), "gtk-menu-transfer-surface");
if (surface)
{
- GdkSurface *widget_surface;
+ GdkSurface *toplevel_surface;
gdk_surface_destroy (surface);
g_object_set_data (G_OBJECT (menu), I_("gtk-menu-transfer-surface"), NULL);
- widget_surface = gtk_native_get_surface (gtk_widget_get_native (GTK_WIDGET (menu)));
- g_object_set_data (G_OBJECT (widget_surface), I_("gdk-attached-grab-surface"), surface);
+ toplevel_surface = gtk_native_get_surface (GTK_NATIVE (priv->toplevel));
+
+ if (toplevel_surface != NULL)
+ g_object_set_data (G_OBJECT (toplevel_surface), I_("gdk-attached-grab-surface"), NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]