pidgin: bd7048b4: Fix a bug where the tooltip is destroyed...

masca at cpw.pidgin.im masca at cpw.pidgin.im
Fri May 13 00:41:45 EDT 2011


----------------------------------------------------------------------
Revision: bd7048b400183bce9428ecfdc6fb5912a127f1c8
Parent:   f7c1f53a8a7d6e21b29c979350e9e734f88a307d
Author:   masca at cpw.pidgin.im
Date:     05/13/11 00:32:48
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/bd7048b400183bce9428ecfdc6fb5912a127f1c8

Changelog: 

Fix a bug where the tooltip is destroyed when it have a lot of information. Fixes #10510

Changes against parent f7c1f53a8a7d6e21b29c979350e9e734f88a307d

  patched  ChangeLog
  patched  pidgin/pidgintooltip.c

-------------- next part --------------
============================================================
--- ChangeLog	9a3cd37a40d198edba991991ae0a4b448482f89c
+++ ChangeLog	ce6ad6023a20669845c16ea188c62271d41c31d8
@@ -18,6 +18,8 @@ version 2.8.0 (??/??/????):
 	  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
============================================================
--- pidgin/pidgintooltip.c	6e9d24b4388937ae9d386d8ab322032e674fcfd2
+++ pidgin/pidgintooltip.c	72c61132854e8efb3f1d0c9327d128649941d258
@@ -134,6 +134,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;
 	GdkRectangle mon_size;
@@ -154,6 +155,9 @@ 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)
@@ -175,6 +179,12 @@ setup_tooltip_window_position(gpointer d
 			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);


More information about the Commits mailing list