[gtk/pick-insensitive2] Keep a drawable check in gtk_widget_contains
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/pick-insensitive2] Keep a drawable check in gtk_widget_contains
- Date: Sun, 7 Apr 2019 20:36:48 +0000 (UTC)
commit 1b362d1f01f114a6d5a324158a50a90e6b9a010b
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 7 20:34:12 2019 +0000
Keep a drawable check in gtk_widget_contains
If the widget is not drawable, it probably doesn't have
an allocation, so asking the question does not make much
sense.
gtk/gtkwidget.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index f7b2087914..ff728fed8b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10998,6 +10998,9 @@ gtk_widget_contains (GtkWidget *widget,
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
+ if (!_gtk_widget_is_drawable (widget))
+ return FALSE;
+
return GTK_WIDGET_GET_CLASS (widget)->contains (widget, x, y);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]