[gtk+/gtk-3-16] widget: Make sure we only run controllers on realized widgets
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] widget: Make sure we only run controllers on realized widgets
- Date: Mon, 21 Sep 2015 14:49:00 +0000 (UTC)
commit c2589026ae146ba862e3e7f4084dd00e9117b924
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Sep 21 15:09:32 2015 +0200
widget: Make sure we only run controllers on realized widgets
The default event bubbling paths are prone to just running event controllers
even after the widget was potentially unrealized/destroyed in an event
handler callback, so bail out early if that's the case.
https://bugzilla.gnome.org/show_bug.cgi?id=755352
gtk/gtkwidget.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index bb380d9..f3e31e3 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7425,6 +7425,9 @@ _gtk_widget_run_controllers (GtkWidget *widget,
{
GList *next = l->next;
+ if (!WIDGET_REALIZED_FOR_EVENT (widget, event))
+ break;
+
data = l->data;
if (data->controller == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]