Mercurial > pidgin
changeset 28917:48d2b6d1ab74
irssi wm: Move/Resize windows only if necessary.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 28 Jan 2010 17:44:28 +0000 |
parents | 06144d315c08 |
children | 5ffedd1578f0 9c3e0f2e82ea |
files | finch/libgnt/wms/irssi.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/libgnt/wms/irssi.c Thu Jan 28 17:24:13 2010 +0000 +++ b/finch/libgnt/wms/irssi.c Thu Jan 28 17:44:28 2010 +0000 @@ -300,10 +300,15 @@ 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); } }