An expose event is now sent when using XVideo output.
authorSam Lantinga <slouken@libsdl.org>
Fri, 31 Aug 2001 21:08:30 +0000
changeset 161eb6b76a95f2d
parent 160 2a8d929f50e0
child 162 0a26c92c2385
An expose event is now sent when using XVideo output.
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11image.c
     1.1 --- a/src/video/x11/SDL_x11events.c	Fri Aug 31 20:53:05 2001 +0000
     1.2 +++ b/src/video/x11/SDL_x11events.c	Fri Aug 31 21:08:30 2001 +0000
     1.3 @@ -407,11 +407,7 @@
     1.4  printf("Expose (count = %d)\n", xevent.xexpose.count);
     1.5  #endif
     1.6  		if ( SDL_VideoSurface && (xevent.xexpose.count == 0) ) {
     1.7 -			if ( SDL_VideoSurface->flags & SDL_OPENGL ) {
     1.8 -				SDL_PrivateExpose();
     1.9 -			} else {
    1.10 -				X11_RefreshDisplay(this);
    1.11 -			}
    1.12 +			X11_RefreshDisplay(this);
    1.13  		}
    1.14  	    }
    1.15  	    break;
     2.1 --- a/src/video/x11/SDL_x11image.c	Fri Aug 31 20:53:05 2001 +0000
     2.2 +++ b/src/video/x11/SDL_x11image.c	Fri Aug 31 21:08:30 2001 +0000
     2.3 @@ -29,6 +29,7 @@
     2.4  
     2.5  #include "SDL_error.h"
     2.6  #include "SDL_endian.h"
     2.7 +#include "SDL_events_c.h"
     2.8  #include "SDL_x11image_c.h"
     2.9  
    2.10  #if defined(__USLC__)
    2.11 @@ -427,8 +428,11 @@
    2.12  
    2.13  void X11_RefreshDisplay(_THIS)
    2.14  {
    2.15 -	/* Don't refresh a display that doesn't have an image (like GL) */
    2.16 +	/* Don't refresh a display that doesn't have an image (like GL)
    2.17 +	   Instead, post an expose event so the application can refresh.
    2.18 +	 */
    2.19  	if ( ! SDL_Ximage || (enable_autorefresh <= 0) ) {
    2.20 +		SDL_PrivateExpose();
    2.21  		return;
    2.22  	}
    2.23  #ifndef NO_SHARED_MEMORY