Bug 1430728 - [Wayland] - position wl_subsurface when attached GtkWidget allocation changes, r=jhorak

MozReview-Commit-ID: 1q3XIouxavQ

--HG--
extra : rebase_source : 59fcb138c55fe1250b26c4e1ec120a14c8c4c4ad
This commit is contained in:
Martin Stransky 2018-01-16 10:26:58 +01:00
Родитель 0dced01fb2
Коммит ecb1224028
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -424,6 +424,17 @@ moz_container_size_allocate (GtkWidget *widget,
allocation->width,
allocation->height);
}
#if defined(MOZ_WAYLAND)
// We need to position our subsurface according to GdkWindow
// when offset changes (GdkWindow is maximized for instance).
// see gtk-clutter-embed.c for reference.
if (container->subsurface) {
gint x, y;
gdk_window_get_position(gtk_widget_get_window(widget), &x, &y);
wl_subsurface_set_position(container->subsurface, x, y);
}
#endif
}
void