[gtk] widget: Not all toplevels are containers
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] widget: Not all toplevels are containers
- Date: Wed, 11 Apr 2018 02:06:21 +0000 (UTC)
commit 2dd37e9624c9f9024f919b7ea411a414eb5661d3
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 11 04:04:37 2018 +0200
widget: Not all toplevels are containers
Guard against GtkInvisible.
gtk/gtkwidget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 9bfbffa95e..8a96707b4b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3694,7 +3694,7 @@ gtk_widget_connect_frame_clock (GtkWidget *widget)
GtkWidgetPrivate *priv = widget->priv;
GdkFrameClock *frame_clock;
- if (_gtk_widget_is_toplevel (widget))
+ if (GTK_IS_CONTAINER (widget) && _gtk_widget_is_toplevel (widget))
gtk_container_start_idle_sizer (GTK_CONTAINER (widget));
frame_clock = gtk_widget_get_frame_clock (widget);
@@ -3718,7 +3718,7 @@ gtk_widget_disconnect_frame_clock (GtkWidget *widget)
{
GtkWidgetPrivate *priv = widget->priv;
- if (_gtk_widget_is_toplevel (widget))
+ if (GTK_IS_CONTAINER (widget) && _gtk_widget_is_toplevel (widget))
gtk_container_stop_idle_sizer (GTK_CONTAINER (widget));
gtk_css_node_invalidate_frame_clock (priv->cssnode, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]