changeset 15186:8abf1eed90f3

- fix black screen problem on reinit - disable colorkey autopainting when painting it manually
author al
date Sat, 16 Apr 2005 15:52:03 +0000
parents b7c105c59e2d
children d9cf9db41b16
files libvo/vo_xv.c libvo/x11_common.c
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xv.c	Sat Apr 16 15:17:57 2005 +0000
+++ b/libvo/vo_xv.c	Sat Apr 16 15:52:03 2005 +0000
@@ -426,7 +426,6 @@
 
     panscan_calc();
 
-    XClearWindow(mDisplay, vo_window);
 #if 0
 #ifdef HAVE_SHM
     if (Shmem_Flag)
--- a/libvo/x11_common.c	Sat Apr 16 15:17:57 2005 +0000
+++ b/libvo/x11_common.c	Sat Apr 16 15:52:03 2005 +0000
@@ -2407,11 +2407,12 @@
       }
     }
 
+    xv_atom = xv_intern_atom_if_exists( "XV_AUTOPAINT_COLORKEY" );    
+
     /* should we draw the colorkey ourselves or activate autopainting? */
     if ( xv_ck_info.method == CK_METHOD_AUTOPAINT )
     {
       rez = !Success; // reset rez to something different than Success
-      xv_atom = xv_intern_atom_if_exists( "XV_AUTOPAINT_COLORKEY" );
  
       if ( xv_atom != None ) // autopaint is supported
       {
@@ -2424,6 +2425,13 @@
         xv_ck_info.method = CK_METHOD_MANUALFILL;
       }
     }
+    else // disable colorkey autopainting if supported
+    {
+      if ( xv_atom != None ) // we have autopaint attribute
+      {
+        XvSetPortAttribute( mDisplay, xv_port, xv_atom, 0 );
+      }
+    }
   }
   else // do no colorkey drawing at all
   {