# HG changeset patch # User ib # Date 1314895492 0 # Node ID afede91f9d5fb23b40eeaa22835c1b5ac1bf55d9 # Parent 8beec562ce0e607247914f90473eed9700428d21 Don't use current x and y position of video window for saving. Save the x and y position according to the skin file instead of the current window position and update this "skin position" when the window gets moved. This prevents unwanted window position changes when saving. (A window will change its size during playback and a right aligned window thus its x and y position.) diff -r 8beec562ce0e -r afede91f9d5f gui/interface.c --- a/gui/interface.c Wed Aug 31 17:45:02 2011 +0000 +++ b/gui/interface.c Thu Sep 01 16:44:52 2011 +0000 @@ -288,8 +288,8 @@ if (gui_save_pos) { gui_main_pos_x = guiApp.mainWindow.X; gui_main_pos_y = guiApp.mainWindow.Y; - gui_sub_pos_x = guiApp.subWindow.X; - gui_sub_pos_y = guiApp.subWindow.Y; + gui_sub_pos_x = guiApp.sub.x; + gui_sub_pos_y = guiApp.sub.y; } #ifdef CONFIG_ASS diff -r 8beec562ce0e -r afede91f9d5f gui/ui/sub.c --- a/gui/ui/sub.c Wed Aug 31 17:45:02 2011 +0000 +++ b/gui/ui/sub.c Thu Sep 01 16:44:52 2011 +0000 @@ -85,7 +85,13 @@ { case wsPLMouseButton: mplSubMoved=1; - if ( !guiApp.subWindow.isFullScreen ) wsMoveWindow( &guiApp.subWindow,False,RX - sx,RY - sy ); + if ( !guiApp.subWindow.isFullScreen ) + { + wsMoveWindow( &guiApp.subWindow,False,RX - sx,RY - sy ); + guiApp.sub.x = guiApp.subWindow.X; + guiApp.sub.y = guiApp.subWindow.Y; + // NOTE TO MYSELF: dragging the title bar goes unnoticed? + } break; case wsPMMouseButton: uiMenuMouseHandle( X,Y,RX,RY );