diff options
author | John Wiegley <johnw@newartisans.com> | 2016-07-12 15:27:25 -0700 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2016-07-12 15:27:25 -0700 |
commit | 54b7eb0dee2397f1430e81b7356f8efb19946ba0 (patch) | |
tree | a463da12f08f32dc78beb2f99a37eb1951f51a43 /src/gtkutil.c | |
parent | 9c8c3a5478db6ff4b245e9128cbf24bd722ab1d6 (diff) | |
download | emacs-54b7eb0dee2397f1430e81b7356f8efb19946ba0.tar.gz |
Revert "Cleanup tooltips"
This reverts commit 20038f8ab75dd1551412a43cd58520c483c22921.
I am reverting this change because it was applied without prior discussion
on emacs-devel, and has been found to break the NS port. It needs more
testing and review before it should be applied here.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r-- | src/gtkutil.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index e08a4b53489..88e6d30bd9a 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -731,23 +731,14 @@ xg_show_tooltip (struct frame *f, int root_x, int root_y) bool xg_hide_tooltip (struct frame *f) { + bool ret = 0; #ifdef USE_GTK_TOOLTIP - struct x_output *x = FRAME_X_OUTPUT (f); - - if (x->ttip_window) + if (f->output_data.x->ttip_window) { GtkWindow *win = f->output_data.x->ttip_window; - block_input (); gtk_widget_hide (GTK_WIDGET (win)); - /* Cancel call to xg_hide_tip. */ - if (x->ttip_timeout != 0) - { - g_source_remove (x->ttip_timeout); - x->ttip_timeout = 0; - } - if (g_object_get_data (G_OBJECT (win), "restore-tt")) { GdkWindow *gwin = gtk_widget_get_window (GTK_WIDGET (win)); @@ -756,21 +747,11 @@ xg_hide_tooltip (struct frame *f) g_object_set (settings, "gtk-enable-tooltips", TRUE, NULL); } unblock_input (); - return 1; - } -#endif - return 0; -} -/* One-shot timeout handler attached to GTK event loop in Fx_show_tip. */ - -gboolean -xg_hide_tip (gpointer data) -{ -#ifdef USE_GTK_TOOLTIP - xg_hide_tooltip ((struct frame *) data); + ret = 1; + } #endif - return FALSE; + return ret; } |