Mercurial > mplayer.hg
changeset 33942:afede91f9d5f
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.)
author | ib |
---|---|
date | Thu, 01 Sep 2011 16:44:52 +0000 |
parents | 8beec562ce0e |
children | de065d751a8c |
files | gui/interface.c gui/ui/sub.c |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 );