[clutter] gdk: stage: report geometry of the underlying surface for foreign windows
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] gdk: stage: report geometry of the underlying surface for foreign windows
- Date: Mon, 7 Sep 2015 17:17:43 +0000 (UTC)
commit 3771ef2f08054770ebc6110de14efd8fa2de3a26
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Mon Aug 31 22:55:57 2015 +0100
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
clutter/gdk/clutter-stage-gdk.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c
index 3ab4b1e..953c2b7 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]