changeset 161:eb6b76a95f2d

An expose event is now sent when using XVideo output.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 31 Aug 2001 21:08:30 +0000
parents 2a8d929f50e0
children 0a26c92c2385
files src/video/x11/SDL_x11events.c src/video/x11/SDL_x11image.c
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/x11/SDL_x11events.c	Fri Aug 31 20:53:05 2001 +0000
+++ b/src/video/x11/SDL_x11events.c	Fri Aug 31 21:08:30 2001 +0000
@@ -407,11 +407,7 @@
 printf("Expose (count = %d)\n", xevent.xexpose.count);
 #endif
 		if ( SDL_VideoSurface && (xevent.xexpose.count == 0) ) {
-			if ( SDL_VideoSurface->flags & SDL_OPENGL ) {
-				SDL_PrivateExpose();
-			} else {
-				X11_RefreshDisplay(this);
-			}
+			X11_RefreshDisplay(this);
 		}
 	    }
 	    break;
--- a/src/video/x11/SDL_x11image.c	Fri Aug 31 20:53:05 2001 +0000
+++ b/src/video/x11/SDL_x11image.c	Fri Aug 31 21:08:30 2001 +0000
@@ -29,6 +29,7 @@
 
 #include "SDL_error.h"
 #include "SDL_endian.h"
+#include "SDL_events_c.h"
 #include "SDL_x11image_c.h"
 
 #if defined(__USLC__)
@@ -427,8 +428,11 @@
 
 void X11_RefreshDisplay(_THIS)
 {
-	/* Don't refresh a display that doesn't have an image (like GL) */
+	/* Don't refresh a display that doesn't have an image (like GL)
+	   Instead, post an expose event so the application can refresh.
+	 */
 	if ( ! SDL_Ximage || (enable_autorefresh <= 0) ) {
+		SDL_PrivateExpose();
 		return;
 	}
 #ifndef NO_SHARED_MEMORY