[gtk/drag-icon: 5/7] container: Be more careful with roots
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/drag-icon: 5/7] container: Be more careful with roots
- Date: Mon, 30 Dec 2019 06:15:40 +0000 (UTC)
commit 538efd0cc6aaace3e48fe0e3acd838ba36d372f5
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 30 00:26:39 2019 -0500
container: Be more careful with roots
We were warning if we hit non-container
roots. Instead, call suitable naive api.
gtk/gtkcontainer.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index bbc6968bdf..f3813f2b9d 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -36,7 +36,8 @@
#include "gtkstylecontextprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
-//#include "gtkwindowprivate.h"
+#include "gtknative.h"
+#include "gtkroot.h"
#include "a11y/gtkcontaineraccessibleprivate.h"
@@ -376,8 +377,10 @@ gtk_container_idle_sizer (GdkFrameClock *clock,
{
if (GTK_IS_WINDOW (container))
gtk_window_check_resize (GTK_WINDOW (container));
+ else if (GTK_IS_ROOT (container))
+ gtk_native_check_resize (GTK_NATIVE (container));
else
- g_warning ("gtk_container_idle_sizer() called on a non-window");
+ g_warning ("gtk_container_idle_sizer() called on a non-native non-window");
}
if (!gtk_container_needs_idle_sizer (container))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]