summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libwnck/tasklist.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index f5b5299..ccc7427 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -590,12 +590,32 @@ wnck_button_query_tooltip (GtkWidget *widget,
GtkTooltip *tooltip)
{
WnckButton *self;
+ GtkLabel *label;
+ char *tooltip_text;
self = WNCK_BUTTON (widget);
if (!self->tasklist->priv->tooltips_enabled)
return FALSE;
+ label = GTK_LABEL (self->label);
+ tooltip_text = gtk_widget_get_tooltip_text (widget);
+
+ if (g_strcmp0 (gtk_label_get_text (label), tooltip_text) == 0)
+ {
+ PangoLayout *layout;
+
+ layout = gtk_label_get_layout (label);
+
+ if (!pango_layout_is_ellipsized (layout))
+ {
+ g_free (tooltip_text);
+ return FALSE;
+ }
+ }
+
+ g_free (tooltip_text);
+
return GTK_WIDGET_CLASS (wnck_button_parent_class)->query_tooltip (widget,
x,
y,