summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui_beval.c9
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gui_beval.c b/src/gui_beval.c
index 10478c6776..9e461e687c 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -253,6 +253,9 @@ addEventHandler(GtkWidget *target, BalloonEval *beval)
if (gtk_socket_id == 0 && gui.mainwin != NULL
&& gtk_widget_is_ancestor(target, gui.mainwin))
{
+ gtk_widget_add_events(gui.mainwin,
+ GDK_LEAVE_NOTIFY_MASK);
+
g_signal_connect(G_OBJECT(gui.mainwin), "event",
G_CALLBACK(mainwin_event_cb),
beval);
@@ -360,6 +363,12 @@ mainwin_event_cb(GtkWidget *widget UNUSED, GdkEvent *event, gpointer data)
case GDK_KEY_RELEASE:
key_event(beval, event->key.keyval, FALSE);
break;
+ case GDK_LEAVE_NOTIFY:
+ // Ignore LeaveNotify events that are not "normal".
+ // Apparently we also get it when somebody else grabs focus.
+ if (event->crossing.mode == GDK_CROSSING_NORMAL)
+ cancelBalloon(beval);
+ break;
default:
break;
}
diff --git a/src/version.c b/src/version.c
index 05b4a519b4..650382e83f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2999,
+/**/
2998,
/**/
2997,