[MPlayer-cvslog] r34030 - in trunk/gui: interface.c ui/sub.c

ib subversion at mplayerhq.hu
Thu Sep 1 18:44:53 CEST 2011


Author: ib
Date: Thu Sep  1 18:44:52 2011
New Revision: 34030

Log:
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.)

Modified:
   trunk/gui/interface.c
   trunk/gui/ui/sub.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Wed Aug 31 19:45:02 2011	(r34029)
+++ trunk/gui/interface.c	Thu Sep  1 18:44:52 2011	(r34030)
@@ -288,8 +288,8 @@ void guiDone(void)
         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

Modified: trunk/gui/ui/sub.c
==============================================================================
--- trunk/gui/ui/sub.c	Wed Aug 31 19:45:02 2011	(r34029)
+++ trunk/gui/ui/sub.c	Thu Sep  1 18:44:52 2011	(r34030)
@@ -85,7 +85,13 @@ void uiSubMouseHandle( int Button,int X,
            {
             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 );


More information about the MPlayer-cvslog mailing list