[gtk+] tooltip: Fix possible wrong placement



commit 14414d5946212996a8aac3dd49798a0d589b9e11
Author: Olivier Brunel <jjk jjacky com>
Date:   Tue Oct 15 15:06:26 2013 +0200

    tooltip: Fix possible wrong placement
    
    When showing a tooltip on the edge of a monitor, the tooltip could be wrongly
    placed and be shown going from one monitor to the next.
    
    This happened because the current_window wasn't set visible, and when it wasn't
    the returned allocated size would be 1, hence wrong calculations.
    
    Signed-off-by: Olivier Brunel <jjk jjacky com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698730

 gtk/gtktooltip.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 7892ef0..12e49ae 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -1096,6 +1096,7 @@ gtk_tooltip_position (GtkTooltip *tooltip,
 #define MAX_DISTANCE 32
 
   gtk_widget_realize (GTK_WIDGET (tooltip->current_window));
+  gtk_widget_set_visible (GTK_WIDGET (tooltip->current_window), TRUE);
 
   tooltip->tooltip_widget = new_tooltip_widget;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]