diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-07-20 12:13:24 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-07-20 12:13:24 +0000 |
commit | c8c42229f11d2951e9618731166b2237f86d512f (patch) | |
tree | dc23a06068529990157a53d7014cf483e16c6dc7 | |
parent | 13e87f72c9d1deb7f208bd3932187a57ef7eb84a (diff) | |
download | gdk-pixbuf-c8c42229f11d2951e9618731166b2237f86d512f.tar.gz |
Don't pop up under the cursor.
2007-07-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktooltip.c (gtk_tooltip_position): Don't pop up
under the cursor.
svn path=/trunk/; revision=18512
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gtk/gtktooltip.c | 10 |
2 files changed, 15 insertions, 1 deletions
@@ -1,5 +1,11 @@ 2007-07-20 Matthias Clasen <mclasen@redhat.com> + * gtk/gtktooltip.c (gtk_tooltip_position): Don't pop up + under the cursor. This fixes tooltip-induced flickering + in the tasklist in a bottom panel. + +2007-07-20 Matthias Clasen <mclasen@redhat.com> + * gtk/gtkpathbar.c (make_directory_button): Don't leak a label. (#455901, Christian Persch, Vincent Geddes) diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index a79617034..d60829df3 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -751,7 +751,15 @@ gtk_tooltip_position (GtkTooltip *tooltip, if (y + requisition.height > monitor.y + monitor.height) y -= y - (monitor.y + monitor.height) + requisition.height; - + + if (!tooltip->keyboard_mode_enabled) + { + /* don't pop up under the pointer */ + if (x <= tooltip->last_x && tooltip->last_x < x + requisition.width && + y <= tooltip->last_y && tooltip->last_y < y + requisition.height) + y = tooltip->last_y - requisition.height - 2; + } + gtk_window_move (GTK_WINDOW (tooltip->current_window), x, y); gtk_widget_show (GTK_WIDGET (tooltip->current_window)); } |