# HG changeset patch # User Eric Warmenhoven # Date 979849911 0 # Node ID 42955549cdd9c085a16bbc8f41f4a1321924749f # Parent 47413c49bbeecccd436d161d6e29d3f6de98126f [gaim-migrate @ 1423] patch from mishan to save window positions correctly committer: Tailor Script diff -r 47413c49bbee -r 42955549cdd9 src/applet.c --- a/src/applet.c Thu Jan 18 19:54:13 2001 +0000 +++ b/src/applet.c Thu Jan 18 20:31:51 2001 +0000 @@ -244,7 +244,7 @@ GNOME_Panel_OrientType orient = applet_widget_get_panel_orient( APPLET_WIDGET(applet) ); pad = 5; - gdk_window_get_position(gtk_widget_get_parent_window(appletframe), &x, &y); + gdk_window_get_root_origin(gtk_widget_get_parent_window(appletframe), &x, &y); if (for_blist) { if (general_options & OPT_GEN_SAVED_WINDOWS) { buddy_req.width = blist_pos.width; @@ -286,7 +286,7 @@ if (general_options & OPT_GEN_NEAR_APPLET) gtk_widget_set_uposition ( blist, al.x, al.y ); else if (general_options & OPT_GEN_SAVED_WINDOWS) - 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); } void AppletClicked( GtkWidget *sender, GdkEventButton *ev, gpointer data ){ diff -r 47413c49bbee -r 42955549cdd9 src/buddy.c --- 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); } } diff -r 47413c49bbee -r 42955549cdd9 src/gaim.h --- a/src/gaim.h Thu Jan 18 19:54:13 2001 +0000 +++ b/src/gaim.h Thu Jan 18 20:31:51 2001 +0000 @@ -148,8 +148,6 @@ int y; int width; int height; - int xoff; - int yoff; }; diff -r 47413c49bbee -r 42955549cdd9 src/gaimrc.c --- a/src/gaimrc.c Thu Jan 18 19:54:13 2001 +0000 +++ b/src/gaimrc.c Thu Jan 18 20:31:51 2001 +0000 @@ -652,8 +652,6 @@ blist_pos.y = atoi(p->value[1]); blist_pos.width = atoi(p->value[2]); blist_pos.height = atoi(p->value[3]); - blist_pos.xoff = atoi(p->value[4]); - blist_pos.yoff = atoi(p->value[5]); } } @@ -675,9 +673,8 @@ fprintf(f, "\treport_idle { %d }\n", report_idle); fprintf(f, "\tweb_browser { %d }\n", web_browser); fprintf(f, "\tweb_command { %s }\n", web_command); - fprintf(f, "\tblist_pos { %d } { %d } { %d } { %d } { %d } { %d }\n", - blist_pos.x, blist_pos.y, blist_pos.width, blist_pos.height, - blist_pos.xoff, blist_pos.yoff); + fprintf(f, "\tblist_pos { %d } { %d } { %d } { %d }\n", + blist_pos.x, blist_pos.y, blist_pos.width, blist_pos.height); fprintf(f, "}\n"); } @@ -785,8 +782,6 @@ blist_pos.height = 0; blist_pos.x = 0; blist_pos.y = 0; - blist_pos.xoff = 0; - blist_pos.yoff = 0; } }