[gtk/gtk-3-24: 1/2] entry: Handle no-window events in gtk_entry_event
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] entry: Handle no-window events in gtk_entry_event
- Date: Thu, 15 Nov 2018 10:03:37 +0000 (UTC)
commit 2e24349fc6aa2ae75b3952233efb2781a9fcc76a
Author: Andrea Azzarone <andrea azzarone canonical com>
Date: Thu Sep 27 14:19:34 2018 +0200
entry: Handle no-window events in gtk_entry_event
gtk_entry_event's goal is to detect if a specific event concerns one of the two
entry icons. It can happen that this function is called during initialization
and/or before the entry is realized. In this case the entry icons (and the
event) will not yet have an associated window. The code should consider the
aforementioned situation and avoid matching a icon and an event with no
associated windows.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1366
gtk/gtkentry.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 35995d84bb..3380e5d153 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -4324,6 +4324,7 @@ gtk_entry_event (GtkWidget *widget,
for (i = 0; i < MAX_ICONS; i++)
{
if (priv->icons[i] &&
+ event->any.window != NULL &&
priv->icons[i]->window == event->any.window)
{
icon_info = priv->icons[i];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]