summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_out/video_out_opengl2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_out/video_out_opengl2.c b/src/video_out/video_out_opengl2.c
index 9ae0c5710..f281085b1 100644
--- a/src/video_out/video_out_opengl2.c
+++ b/src/video_out/video_out_opengl2.c
@@ -1221,9 +1221,11 @@ static void opengl2_display_frame( vo_driver_t *this_gen, vo_frame_t *frame_gen
opengl2_redraw_needed( this_gen );
+ XLockDisplay (this->display);
pthread_mutex_lock(&this->drawable_lock); /* protect drawable from being changed */
opengl2_draw( this, frame );
pthread_mutex_unlock(&this->drawable_lock); /* allow changing drawable again */
+ XUnlockDisplay (this->display);
frame->vo_frame.free( &frame->vo_frame );
}