# HG changeset patch # User masca@cpw.pidgin.im # Date 1305261168 0 # Node ID 6ee534f155d7dc4185ccbb1e32f1c0e24edede2f # Parent 5ef22297ea91294f9820e8db9ef16fac5df32c57 Fix a bug where the tooltip is destroyed when it have a lot of information. Fixes #10510 diff -r 5ef22297ea91 -r 6ee534f155d7 ChangeLog --- a/ChangeLog Thu May 12 12:47:40 2011 +0000 +++ b/ChangeLog Fri May 13 04:32:48 2011 +0000 @@ -18,6 +18,8 @@ stream to the existing call. (Jakub Adam) (#13537) * Pidgin plugins can now override tab completion and detect clicks on usernames in the chat userlist. (kawaii.neko) (#12599) + * Fix the tooltip being destroyed when it is full of information and + cover the mouse (dliang) (#10510) libpurple: * media: Allow obtaining active local and remote candidates. (Jakub diff -r 5ef22297ea91 -r 6ee534f155d7 pidgin/pidgintooltip.c --- a/pidgin/pidgintooltip.c Thu May 12 12:47:40 2011 +0000 +++ b/pidgin/pidgintooltip.c Fri May 13 04:32:48 2011 +0000 @@ -134,6 +134,7 @@ { int sig; int scr_w, scr_h, x, y, dy; + int preserved_x, preserved_y; int mon_num; GdkScreen *screen = NULL; GdkRectangle mon_size; @@ -154,6 +155,9 @@ 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) @@ -175,6 +179,12 @@ x = mon_size.x; } + /* If the mouse covered by the tipwindow, move the tipwindow + * to the righ side of the it */ + if ((preserved_x >= x) && (preserved_x <= (x + w)) + && (preserved_y >= y) && (preserved_y <= (y + h))) + x = preserved_x + dy; + gtk_widget_set_size_request(tipwindow, w, h); gtk_window_move(GTK_WINDOW(tipwindow), x, y); gtk_widget_show(tipwindow);