[clutter] gdk: Fix realization in the foreign-window case



commit 2034f1677dfacef2cb93c101e758143460eee31e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Nov 30 21:43:36 2012 -0500

    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 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c
index 0e32caf..342906a 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)
         {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]