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
This commit is contained in:
parent
55dce70440
commit
3771ef2f08
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user