To: vim_dev@googlegroups.com Subject: Patch 8.2.2999 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2999 Problem: Balloon sometimes does not hide with GTK 3. Solution: Also listen to GDK_LEAVE_NOTIFY. (Johannes Stezenbach) Files: src/gui_beval.c *** ../vim-8.2.2998/src/gui_beval.c 2021-03-18 22:28:53.563835682 +0100 --- src/gui_beval.c 2021-06-14 22:06:39.937975304 +0200 *************** *** 253,258 **** --- 253,261 ---- 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,365 **** --- 363,374 ---- 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; } *** ../vim-8.2.2998/src/version.c 2021-06-14 21:32:16.538794967 +0200 --- src/version.c 2021-06-14 22:06:55.517910698 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2999, /**/ -- An easy way to determine if you have enough teamwork to be doomed is simply to measure how long it takes from the time you decide to go to lunch together until the time you actually eat. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///