Opened 10 years ago

Closed 8 years ago

#10510 closed patch (fixed)

tooltip window will be destroied immeditaly if it was full of informations

Reported by: dliang Owned by: salinasv
Milestone: 2.8.0 Component: pidgin (gtk)
Version: 2.6.2 Keywords:


  1. move the pidgin window to the top left site of the screen to make it easier to reproduce.
  2. fill the 'Avaiable' status with lots of informations.
  3. move the mouse to the body of the current account.

The tooltip window will destroied immediatly after it show on the screen.

It was caused by setup_tooltip_window_position. In this function, it will calculte the tipwindow position. But if the height was too long and the x-position was reset to '0', sometimes the tipwindow will colver the mouse. So the treeview will get a signal of 'leave-notify-event', thus the tipwindow will disappear.

One simple solution is, check to see if the window would cover the mouse, if so, move the window to the right side of the current mouse position.

Change History (5)

comment:1 Changed 9 years ago by salinasv

  • Status changed from new to pending

Sorry for not looking at this patch earlier.

Is this reproducible with newer versions? There have been some work over the tooltip.

comment:2 Changed 9 years ago by dliang

  • Status changed from pending to new

Not sure about the new codes, I checked it in 2.7.0, it still exist. In low resolution, it is easier to reproduce the bug. I wrote the following patch:

diff -Npur pidgin-old/pidgin/pidgintooltip.c pidgin-new/pidgin/pidgintooltip.c
--- pidgin-old/pidgin/pidgintooltip.c   2010-03-31 04:19:44.000000000 +0800
+++ pidgin-new/pidgin/pidgintooltip.c   2010-03-31 04:21:40.000000000 +0800
@@ -136,6 +136,7 @@ setup_tooltip_window_position(gpointer d
        int sig;
        int scr_w, scr_h, x, y, dy;
+       int preserved_x, preserved_y;
        int mon_num;
        GdkScreen *screen = NULL;
@@ -171,6 +172,10 @@ setup_tooltip_window_position(gpointer d
        if (h > mon_size.height)
                h = mon_size.height - 10;
+       preserved_x = x;
+       preserved_y = y;
        x -= ((w >> 1) + 4);

        if ((y + h + 4) > scr_h)
@@ -192,6 +197,11 @@ setup_tooltip_window_position(gpointer d
                        x = mon_size.x;

+       if ((preserved_x >= x) && (preserved_x <= (x + w)) && (preserved_y >= y) && (preserved_y <= (y + h))) {
+               /* If the mouse covered by the tipwindow, move the tipwindow to the right side of the it. */
+               x = preserved_x + 10;
+       }
        gtk_widget_set_size_request(tipwindow, w, h);
        gtk_window_move(GTK_WINDOW(tipwindow), x, y);

comment:3 Changed 9 years ago by darkrain42

  • Component changed from unclassified to pidgin (gtk)
  • Milestone set to Patches Needing Review
  • Owner changed from rekkanoryo to salinasv
  • Type changed from defect to patch

comment:4 Changed 8 years ago by salinasv

dliang, I need your name to be credited for the patch.

comment:5 Changed 8 years ago by masca@…

  • Milestone changed from Patches Needing Review to 2.8.0
  • Resolution set to fixed
  • Status changed from new to closed

(In bd7048b400183bce9428ecfdc6fb5912a127f1c8):
Fix a bug where the tooltip is destroyed when it have a lot of information. Fixes #10510

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!