[gnome-shell/gnome-3-22] gtk-embed: Don't try to compare with unrealized window
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-22] gtk-embed: Don't try to compare with unrealized window
- Date: Thu, 15 Dec 2016 13:19:45 +0000 (UTC)
commit a6878855e962dee1c1abd6d958c3ef8731b47dcb
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Dec 15 19:34:10 2016 +0800
gtk-embed: Don't try to compare with unrealized window
After having embedded a Gtk window, we start to listen for the
corresponding MetaWindow to know when it has been mapped by the
compositor. If the embedder does not realize the window immediately,
and some other window is created and mapped before the embedder
realizes the window, we would prior to this patch try to dereference
the not created GdkWindow. Fix this by NULL checking the GdkWindow
before dereferencing. We will never miss the needed MetaWindow creation
since it can not have been mapped have it not yet been realized.
https://bugzilla.gnome.org/show_bug.cgi?id=776130
src/shell-gtk-embed.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/shell-gtk-embed.c b/src/shell-gtk-embed.c
index 3f30613..176b413 100644
--- a/src/shell-gtk-embed.c
+++ b/src/shell-gtk-embed.c
@@ -66,7 +66,7 @@ shell_gtk_embed_window_created_cb (MetaDisplay *display,
Window xwindow = meta_window_get_xwindow (window);
GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (priv->window));
- if (xwindow == gdk_x11_window_get_xid (gdk_window))
+ if (gdk_window && xwindow == gdk_x11_window_get_xid (gdk_window))
{
ClutterActor *window_actor =
CLUTTER_ACTOR (meta_window_get_compositor_private (window));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]