changeset 6059:c0ae8c0eda72

fix Arpi's bugs
author pontscho
date Sun, 12 May 2002 16:01:08 +0000
parents f81923e3d084
children 61f39b98ba4d
files libvo/vo_x11.c libvo/vo_xmga.c libvo/x11_common.c
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_x11.c	Sun May 12 05:54:29 2002 +0000
+++ b/libvo/vo_x11.c	Sun May 12 16:01:08 2002 +0000
@@ -1,4 +1,3 @@
-#define DISP
 
 /*
  * video_out_x11.c,X11 interface
@@ -103,7 +102,7 @@
   int ret = vo_x11_check_events(mDisplay);
   
    /* clear the old window */
-  if (ret & VO_EVENT_RESIZE)
+  if ( (ret & VO_EVENT_RESIZE)||(ret & VO_EVENT_EXPOSE) )
   {
     XSetBackground(mDisplay, vo_gc, 0);
     XClearWindow(mDisplay, vo_window);
@@ -437,7 +436,6 @@
 
 static void Display_Image( XImage *myximage,uint8_t *ImageData )
 {
-#ifdef DISP
 #ifdef HAVE_SHM
  if ( Shmem_Flag )
   {
@@ -454,7 +452,6 @@
                ( vo_dwidth - swsContext->dstW ) / 2,( vo_dheight - myximage->height ) / 2,
                swsContext->dstW,myximage->height);
   }
-#endif
 }
 
 static void draw_osd(void)
@@ -469,6 +466,8 @@
 {
   uint8_t *dst[3];
   int dstStride[3];
+
+  check_events();
   
   if((old_vo_dwidth != vo_dwidth || old_vo_dheight != vo_dheight) /*&& y==0*/ && zoomFlag)
   {
--- a/libvo/vo_xmga.c	Sun May 12 05:54:29 2002 +0000
+++ b/libvo/vo_xmga.c	Sun May 12 16:01:08 2002 +0000
@@ -335,8 +335,6 @@
 {
  if(!inited) return;
  inited=0;
- XSetBackground( mDisplay,vo_gc,0 );
- XClearWindow( mDisplay,vo_window );
  mga_uninit();
  saver_on(mDisplay);
  vo_x11_uninit(mDisplay, vo_window);
--- a/libvo/x11_common.c	Sun May 12 05:54:29 2002 +0000
+++ b/libvo/x11_common.c	Sun May 12 16:01:08 2002 +0000
@@ -490,7 +490,7 @@
    vo_MotifWmHints.flags=MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
    if ( d )
     {
-     vo_MotifWmHints.functions=MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE;
+     vo_MotifWmHints.functions=MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE | MWM_FUNC_RESIZE;
      d=MWM_DECOR_ALL;
     }
 #if 0
@@ -529,6 +529,9 @@
     if ( !use_gui )
 #endif
     {
+	XSetBackground( mDisplay,vo_gc,0 );
+	XClearWindow( mDisplay,vo_window );
+  
 	/* and -wid is set */
 	if (WinID < 0)
 	 {