summaryrefslogtreecommitdiffstats
path: root/widget/gtk/MozContainerWayland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'widget/gtk/MozContainerWayland.cpp')
-rw-r--r--widget/gtk/MozContainerWayland.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/widget/gtk/MozContainerWayland.cpp b/widget/gtk/MozContainerWayland.cpp
index 0e50a3f27c..8490f25599 100644
--- a/widget/gtk/MozContainerWayland.cpp
+++ b/widget/gtk/MozContainerWayland.cpp
@@ -436,7 +436,6 @@ void moz_container_wayland_map(GtkWidget* widget) {
void moz_container_wayland_size_allocate(GtkWidget* widget,
GtkAllocation* allocation) {
- MozContainer* container;
GtkAllocation tmp_allocation;
g_return_if_fail(IS_MOZ_CONTAINER(widget));
@@ -447,10 +446,8 @@ void moz_container_wayland_size_allocate(GtkWidget* widget,
allocation->height);
/* short circuit if you can */
- container = MOZ_CONTAINER(widget);
gtk_widget_get_allocation(widget, &tmp_allocation);
- if (!container->data.children && tmp_allocation.x == allocation->x &&
- tmp_allocation.y == allocation->y &&
+ if (tmp_allocation.x == allocation->x && tmp_allocation.y == allocation->y &&
tmp_allocation.width == allocation->width &&
tmp_allocation.height == allocation->height) {
return;
@@ -464,6 +461,7 @@ void moz_container_wayland_size_allocate(GtkWidget* widget,
// We need to position our subsurface according to GdkWindow
// when offset changes (GdkWindow is maximized for instance).
// see gtk-clutter-embed.c for reference.
+ MozContainer* container = MOZ_CONTAINER(widget);
MutexAutoLock lock(container->data.wl_container.container_lock);
if (!container->data.wl_container.surface) {
if (!moz_container_wayland_surface_create_locked(lock, container)) {