From 2034f1677dfacef2cb93c101e758143460eee31e Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 30 Nov 2012 21:43:36 -0500 Subject: [PATCH] gdk: Fix realization in the foreign-window case Found by Coverity. https://bugzilla.gnome.org/show_bug.cgi?id=689496 --- clutter/gdk/clutter-stage-gdk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c index 0e32caf28..342906a9e 100644 --- a/clutter/gdk/clutter-stage-gdk.c +++ b/clutter/gdk/clutter-stage-gdk.c @@ -182,7 +182,12 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window) gboolean use_alpha; gfloat width, height; - if (!stage_gdk->foreign_window) + if (stage_gdk->foreign_window) + { + width = gdk_window_get_width (stage_gdk->window); + height = gdk_window_get_height (stage_gdk->window); + } + else { if (stage_gdk->window != NULL) {