summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2015-08-31 22:55:57 +0100
committerLionel Landwerlin <llandwerlin@gmail.com>2015-09-07 18:17:10 +0100
commit3771ef2f08054770ebc6110de14efd8fa2de3a26 (patch)
treee595401cd441506d0b9835cace0adf589285dc60
parent55dce70440dc27d6b0e38feccbf62422cfabe499 (diff)
downloadclutter-3771ef2f08054770ebc6110de14efd8fa2de3a26.tar.gz
gdk: stage: report geometry of the underlying surface for foreign windows
When running on wayland, we might have our own subsurface desynchronized from the foreign GdkWindow. It is important that we report the size of the actually surface we're rendering to, otherwise the logic in ClutterStage might discard resize operation that resynchronize the subsurface with the stage's size. https://bugzilla.gnome.org/show_bug.cgi?id=754697
-rw-r--r--clutter/gdk/clutter-stage-gdk.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c
index 3ab4b1e78..953c2b7bb 100644
--- a/clutter/gdk/clutter-stage-gdk.c
+++ b/clutter/gdk/clutter-stage-gdk.c
@@ -122,16 +122,21 @@ clutter_stage_gdk_get_geometry (ClutterStageWindow *stage_window,
{
ClutterStageGdk *stage_gdk = CLUTTER_STAGE_GDK (stage_window);
- if (stage_gdk->window != NULL)
+ if (!stage_gdk->foreign_window)
{
- geometry->width = gdk_window_get_width (stage_gdk->window);
- geometry->height = gdk_window_get_height (stage_gdk->window);
+ if (stage_gdk->window != NULL)
+ {
+ geometry->width = gdk_window_get_width (stage_gdk->window);
+ geometry->height = gdk_window_get_height (stage_gdk->window);
+ }
+ else
+ {
+ geometry->width = 640;
+ geometry->height = 480;
+ }
}
else
- {
- geometry->width = 640;
- geometry->height = 480;
- }
+ clutter_stage_window_parent_iface->get_geometry (stage_window, geometry);
}
static void