pidgin: 501e5b77: irssi wm: Move/Resize windows only if ne..

sadrul at pidgin.im sadrul at pidgin.im
Thu Jan 28 12:52:37 EST 2010


-----------------------------------------------------------------
Revision: 501e5b77fa18b2d5241ecdd978f2d87382de8f28
Ancestor: 81c4b8b6e0da3414447106ddc18cf1a9fd4959da
Author: sadrul at pidgin.im
Date: 2010-01-28T17:44:28
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/501e5b77fa18b2d5241ecdd978f2d87382de8f28

Modified files:
        finch/libgnt/wms/irssi.c

ChangeLog: 

irssi wm: Move/Resize windows only if necessary.

-------------- next part --------------
============================================================
--- finch/libgnt/wms/irssi.c	03691f42612fbf119cf45b5a90a27efb47ca8ab3
+++ finch/libgnt/wms/irssi.c	07f029b991b5ab13cdf4f1b8e2b6c8368100027a
@@ -300,10 +300,15 @@ refresh_window(GntWidget *widget, GntNod
 
 	name = gnt_widget_get_name(widget);
 	if (name && strstr(name, "conversation-window")) {
+		int cx, cy, cw, ch;
+		gnt_widget_get_position(widget, &cx, &cy);
+		gnt_widget_get_size(widget, &cw, &ch);
 		find_window_position(irssi, widget, &hor, &vert);
 		get_xywh_for_frame(irssi, hor, vert, &x, &y, &w, &h);
-		gnt_wm_move_window(GNT_WM(irssi), widget, x, y);
-		gnt_wm_resize_window(GNT_WM(irssi), widget, w, h);
+		if (x != cx || y != cy)
+			gnt_wm_move_window(GNT_WM(irssi), widget, x, y);
+		if (w != cw || h != ch)
+			gnt_wm_resize_window(GNT_WM(irssi), widget, w, h);
 	}
 }
 


More information about the Commits mailing list