changeset 35739:6b82e3079aea

Remove unnecessary wsWindowBackground() calls. Add a necessary one to the video window's redraw handler.
author ib
date Wed, 23 Jan 2013 14:36:36 +0000
parents c2b6074cc28d
children ac0b60abb5ac
files gui/interface.c gui/ui/actions.c gui/ui/video.c
diffstat 3 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Wed Jan 23 14:25:22 2013 +0000
+++ b/gui/interface.c	Wed Jan 23 14:36:36 2013 +0000
@@ -202,8 +202,6 @@
     guiApp.videoWindow.KeyHandler   = uiMainKeyHandle;
     guiApp.videoWindow.DandDHandler = uiDandDHandler;
 
-    wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
-
     if (guiApp.video.Bitmap.Image)
         wsImageConvert(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
 
@@ -871,7 +869,6 @@
 
             wsEvents();
             uiVideoRender = True;
-            wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
             wsWindowRedraw(&guiApp.videoWindow);
             wsMouseVisibility(&guiApp.videoWindow, wsShowMouseCursor);
         }
--- a/gui/ui/actions.c	Wed Jan 23 14:25:22 2013 +0000
+++ b/gui/ui/actions.c	Wed Jan 23 14:36:36 2013 +0000
@@ -62,11 +62,6 @@
 
     if (guiApp.menuIsPresent)
         wsWindowLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen);
-
-    if (guiInfo.Playing)
-        wsWindowBackground(&guiApp.videoWindow, 0, 0, 0);
-    else
-        wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
 }
 
 /**
@@ -90,7 +85,6 @@
 
     gui(GUI_SET_STATE, (void *)GUI_PLAY);
     uiVideoRender = False;
-    wsWindowBackground(&guiApp.videoWindow, 0, 0, 0);
 }
 
 /**
@@ -207,7 +201,6 @@
 
     if (!guiInfo.Playing) {
         uiVideoRender = True;
-        wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
         wsWindowRedraw(&guiApp.videoWindow);
     }
 
--- a/gui/ui/video.c	Wed Jan 23 14:25:22 2013 +0000
+++ b/gui/ui/video.c	Wed Jan 23 14:36:36 2013 +0000
@@ -47,6 +47,7 @@
 
  if ( uiVideoRender && guiApp.videoWindow.State == wsWindowExpose )
   {
+   wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
    if ( guiApp.video.Bitmap.Image ) wsImageDraw( &guiApp.videoWindow );
   }
  guiApp.videoWindow.State=0;