widget: guard popover-specific code paths

This is essentially a special case just for GtkPopover,
which is the last widget with a child surface.
This commit is contained in:
Matthias Clasen
2019-02-24 18:41:26 -05:00
parent ad8e92a52e
commit 022bcc6efc

View File

@@ -4477,7 +4477,8 @@ gtk_widget_allocate (GtkWidget *widget,
{
/* Still have to move the window... */
if (_gtk_widget_get_realized (widget) &&
_gtk_widget_get_has_surface (widget))
_gtk_widget_get_has_surface (widget) &&
GTK_IS_POPOVER (widget))
{
GtkAllocation window_alloc;
@@ -4689,7 +4690,8 @@ gtk_widget_real_size_allocate (GtkWidget *widget,
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
if (_gtk_widget_get_realized (widget) &&
_gtk_widget_get_has_surface (widget))
_gtk_widget_get_has_surface (widget) &&
GTK_IS_POPOVER (widget))
{
GtkAllocation window_alloc;