From 590c258945a3865f48afa0a0f9d9b90cc35e548c Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 6 Feb 2008 23:44:38 +0000 Subject: [PATCH] My panels were drifting one or two pixels each time I started studio. This seems to be window-manager dependent. I've added environment variables to allow adjusting the drift to stop it. SYNFIG_WINDOW_POSITION_X_OFFSET and SYNFIG_WINDOW_POSITION_Y_OFFSET. Setting them both to 1 stops the drift for me in xfwm4. git-svn-id: http://svn.voria.com/code@1611 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/dockmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synfig-studio/trunk/src/gtkmm/dockmanager.cpp b/synfig-studio/trunk/src/gtkmm/dockmanager.cpp index 7b5e204..ce05c51 100644 --- a/synfig-studio/trunk/src/gtkmm/dockmanager.cpp +++ b/synfig-studio/trunk/src/gtkmm/dockmanager.cpp @@ -178,6 +178,10 @@ public: if (y > SCALE_FACTOR) y = SCALE_FACTOR - 150; if (y < 0) y = 0; x=x*screen_w/SCALE_FACTOR; y=y*screen_h/SCALE_FACTOR; + if(getenv("SYNFIG_WINDOW_POSITION_X_OFFSET")) + x += atoi(getenv("SYNFIG_WINDOW_POSITION_X_OFFSET")); + if(getenv("SYNFIG_WINDOW_POSITION_Y_OFFSET")) + y += atoi(getenv("SYNFIG_WINDOW_POSITION_Y_OFFSET")); dock_dialog.move(x,y); return true; } -- 2.7.4