changeset 35805:5d163370a554

Restructure code for video window in uiChangeSkin(). Compact the conditions. It's much clearer now what's happening. Additionally, change comment to indicate that the video window will not be reloaded (like all other windows).
author ib
date Sat, 26 Jan 2013 15:32:37 +0000
parents 25852c740093
children ea15d7aebf13
files gui/ui/actions.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/actions.c	Sat Jan 26 01:07:36 2013 +0000
+++ b/gui/ui/actions.c	Sat Jan 26 15:32:37 2013 +0000
@@ -610,21 +610,21 @@
     wsWindowVisibility(&guiApp.mainWindow, wsShowWindow);
     mainVisible = True;
 
-    /* reload video window (must be second!) */
+    /* adjust video window */
 
-    if (guiApp.video.Bitmap.Image)
+    if (guiApp.video.Bitmap.Image) {
         wsImageResize(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
+        wsImageRender(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
+    }
 
-    if (!guiApp.videoWindow.isFullScreen && !guiInfo.Playing) {
+    if (!guiInfo.Playing) {
+        if (!guiApp.videoWindow.isFullScreen) {
         wsWindowResize(&guiApp.videoWindow, guiApp.video.width, guiApp.video.height);
         wsWindowMove(&guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y);
     }
 
-    if (guiApp.video.Bitmap.Image)
-        wsImageRender(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
-
-    if (!guiInfo.Playing)
         wsWindowRedraw(&guiApp.videoWindow);
+    }
 
     /* reload playbar */