lock X11 display better around update_display_window_vosf()

This commit is contained in:
gbeauche 2004-11-15 23:40:23 +00:00
parent e85f4397c8
commit ce67261af4
2 changed files with 2 additions and 3 deletions

View File

@ -368,7 +368,6 @@ There are two cases to check:
static inline void update_display_window_vosf(VIDEO_DRV_INIT) static inline void update_display_window_vosf(VIDEO_DRV_INIT)
{ {
VIDEO_MODE_INIT; VIDEO_MODE_INIT;
XDisplayLock();
int page = 0; int page = 0;
for (;;) { for (;;) {
@ -429,8 +428,6 @@ static inline void update_display_window_vosf(VIDEO_DRV_INIT)
XPutImage(x_display, VIDEO_DRV_WINDOW, VIDEO_DRV_GC, VIDEO_DRV_IMAGE, 0, y1, 0, y1, VIDEO_MODE_X, height); XPutImage(x_display, VIDEO_DRV_WINDOW, VIDEO_DRV_GC, VIDEO_DRV_IMAGE, 0, y1, 0, y1, VIDEO_MODE_X, height);
#endif #endif
} }
XDisplayUnlock();
mainBuffer.dirty = false; mainBuffer.dirty = false;
} }

View File

@ -2480,10 +2480,12 @@ static void video_refresh_window_vosf(void)
if (++tick_counter >= frame_skip) { if (++tick_counter >= frame_skip) {
tick_counter = 0; tick_counter = 0;
if (mainBuffer.dirty) { if (mainBuffer.dirty) {
XDisplayLock();
LOCK_VOSF; LOCK_VOSF;
update_display_window_vosf(static_cast<driver_window *>(drv)); update_display_window_vosf(static_cast<driver_window *>(drv));
UNLOCK_VOSF; UNLOCK_VOSF;
XSync(x_display, false); // Let the server catch up XSync(x_display, false); // Let the server catch up
XDisplayUnlock();
} }
} }
} }