[Pidgin] #10510: tooltip window will be destroied immeditaly if it was full of informations

Pidgin trac at pidgin.im
Mon May 24 03:37:04 EDT 2010


#10510: tooltip window will be destroied immeditaly if it was full of informations
--------------------+-------------------------------------------------------
 Reporter:  dliang  |        Owner:  rekkanoryo  
     Type:  defect  |       Status:  pending     
Milestone:          |    Component:  unclassified
  Version:  2.6.2   |   Resolution:              
 Keywords:          |  
--------------------+-------------------------------------------------------
Changes (by dliang):

  * status:  pending => new


Comment:

 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;
  #if GTK_CHECK_VERSION(2,2,0)
         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;
  #endif
 +
 +       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);
         gtk_widget_show(tipwindow);

-- 
Ticket URL: <http://developer.pidgin.im/ticket/10510#comment:2>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list