From 0a55772493f263c47f0bcf95d5352ee1cccb3790 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Mon, 14 Nov 2005 22:01:22 +0000 Subject: [PATCH] sys/xvimage/xvimagesink.c: Discovered how to take away flickering while resizing the window. Please don't put that in... Original commit message from CVS: 2005-11-14 Julien MOUTTE * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xwindow_new): Discovered how to take away flickering while resizing the window. Please don't put that in ximagesink, refactoring in progress. --- ChangeLog | 7 +++++++ sys/xvimage/xvimagesink.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 217828cede..936edd2526 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-14 Julien MOUTTE + + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xwindow_new): + Discovered how to take away flickering while resizing the + window. Please don't put that in ximagesink, refactoring in + progress. + 2005-11-14 Michael Smith * gst/tcp/gstmultifdsink.c: (gst_multifdsink_client_queue_data), diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 64406c8df2..f7274e67a8 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -525,6 +525,10 @@ gst_xvimagesink_xwindow_new (GstXvImageSink * xvimagesink, 0, 0, xwindow->width, xwindow->height, 0, 0, xvimagesink->xcontext->black); + /* We have to do that to prevent X from redrawing the background on + * ConfigureNotify. This takes away flickering of video when resizing. */ + XSetWindowBackgroundPixmap (xvimagesink->xcontext->disp, xwindow->win, None); + XSelectInput (xvimagesink->xcontext->disp, xwindow->win, ExposureMask | StructureNotifyMask | PointerMotionMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask);