src/video/x11/SDL_x11image.c
changeset 161 eb6b76a95f2d
parent 0 74212992fb08
child 166 39877400bd1e
equal deleted inserted replaced
160:2a8d929f50e0 161:eb6b76a95f2d
    27 
    27 
    28 #include <stdlib.h>
    28 #include <stdlib.h>
    29 
    29 
    30 #include "SDL_error.h"
    30 #include "SDL_error.h"
    31 #include "SDL_endian.h"
    31 #include "SDL_endian.h"
       
    32 #include "SDL_events_c.h"
    32 #include "SDL_x11image_c.h"
    33 #include "SDL_x11image_c.h"
    33 
    34 
    34 #if defined(__USLC__)
    35 #if defined(__USLC__)
    35 #ifdef HAVE_KSTAT
    36 #ifdef HAVE_KSTAT
    36 #undef HAVE_KSTAT
    37 #undef HAVE_KSTAT
   425 	++enable_autorefresh;
   426 	++enable_autorefresh;
   426 }
   427 }
   427 
   428 
   428 void X11_RefreshDisplay(_THIS)
   429 void X11_RefreshDisplay(_THIS)
   429 {
   430 {
   430 	/* Don't refresh a display that doesn't have an image (like GL) */
   431 	/* Don't refresh a display that doesn't have an image (like GL)
       
   432 	   Instead, post an expose event so the application can refresh.
       
   433 	 */
   431 	if ( ! SDL_Ximage || (enable_autorefresh <= 0) ) {
   434 	if ( ! SDL_Ximage || (enable_autorefresh <= 0) ) {
       
   435 		SDL_PrivateExpose();
   432 		return;
   436 		return;
   433 	}
   437 	}
   434 #ifndef NO_SHARED_MEMORY
   438 #ifndef NO_SHARED_MEMORY
   435 	if ( this->UpdateRects == X11_MITSHMUpdate ) {
   439 	if ( this->UpdateRects == X11_MITSHMUpdate ) {
   436 		XShmPutImage(SDL_Display, SDL_Window, SDL_GC, SDL_Ximage,
   440 		XShmPutImage(SDL_Display, SDL_Window, SDL_GC, SDL_Ximage,