diff src/buddy.c @ 1413:42955549cdd9

[gaim-migrate @ 1423] patch from mishan to save window positions correctly committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 18 Jan 2001 20:31:51 +0000
parents 17e544f8c7fb
children 9be6790092dc
line wrap: on
line diff
--- a/src/buddy.c	Thu Jan 18 19:54:13 2001 +0000
+++ b/src/buddy.c	Thu Jan 18 20:31:51 2001 +0000
@@ -2016,7 +2016,7 @@
 {
         int x, y, width, height;
         int save = 0;
-        gdk_window_get_position(blist->window, &x, &y);
+        gdk_window_get_root_origin(blist->window, &x, &y);
         gdk_window_get_size(blist->window, &width, &height);
 
         if(e->send_event) { /* Is a position event */
@@ -2025,14 +2025,10 @@
                 blist_pos.x = x;
                 blist_pos.y = y;
         } else { /* Is a size event */
-                if (blist_pos.xoff != x || blist_pos.yoff != y ||
-                   blist_pos.width != width || blist_pos.width != width)
+                if (blist_pos.width != width || blist_pos.width != width)
                         save = 1;
-
                 blist_pos.width = width;
                 blist_pos.height = height;
-                blist_pos.xoff = x;
-                blist_pos.yoff = y;
         }
 
         if (save)
@@ -2462,7 +2458,7 @@
 
         if (general_options & OPT_GEN_SAVED_WINDOWS) {
                 if (blist_pos.width != 0) { /* Sanity check! */
-                        gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff, blist_pos.y - blist_pos.yoff);
+                        gtk_widget_set_uposition(blist, blist_pos.x, blist_pos.y);
                         gtk_widget_set_usize(blist, blist_pos.width, blist_pos.height);
                 }
         }