changeset 35657:eadf0731a29a

Add property wsAspect. Windows with this property shall regard option 'keepaspect'. Tag video window with wsAspect.
author ib
date Tue, 15 Jan 2013 12:44:03 +0000
parents f2093dc82b5f
children d798beebfe71
files gui/interface.c gui/wm/ws.c gui/wm/ws.h
diffstat 3 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Tue Jan 15 12:37:42 2013 +0000
+++ b/gui/interface.c	Tue Jan 15 12:44:03 2013 +0000
@@ -172,7 +172,7 @@
     if (guiWinID >= 0)
         guiApp.mainWindow.Parent = guiWinID;
 
-    wsCreateWindow(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow | wsWaitMap, "MPlayer - Video");
+    wsCreateWindow(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow | wsWaitMap | wsAspect, "MPlayer - Video");
     wsDestroyImage(&guiApp.videoWindow);
     wsCreateImage(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
     wsXDNDMakeAwareness(&guiApp.videoWindow);
--- a/gui/wm/ws.c	Tue Jan 15 12:37:42 2013 +0000
+++ b/gui/wm/ws.c	Tue Jan 15 12:44:03 2013 +0000
@@ -471,7 +471,7 @@
         win->SizeHint.max_height = win->Height;
     }
 
-    if (vo_keepaspect /*&& (win->Property & wsAspect)*/) {
+    if (vo_keepaspect && (win->Property & wsAspect)) {
         win->SizeHint.flags |= PAspect;
         win->SizeHint.min_aspect.x = win->Width;
         win->SizeHint.min_aspect.y = win->Height;
--- a/gui/wm/ws.h	Tue Jan 15 12:37:42 2013 +0000
+++ b/gui/wm/ws.h	Tue Jan 15 12:44:03 2013 +0000
@@ -72,6 +72,7 @@
 #define  wsHideWindow   16
 #define  wsOverredirect 32
 #define  wsWaitMap      64
+#define  wsAspect       128
 
 #define  wsNoBorder 0