summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_vidix.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-05-06 03:09:32 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-05-06 03:09:32 +0000
commit535b68fd76105ad5ae2c3c3812e6444eac9c59ce (patch)
tree17e9018a90c1d2a8bc72cddaa65170181afb943c /src/video_out/video_out_vidix.c
parentbfe36df3f6502e3db75ccd33c08cdc7256dc63ec (diff)
downloadxine-lib-535b68fd76105ad5ae2c3c3812e6444eac9c59ce.tar.gz
xine-lib-535b68fd76105ad5ae2c3c3812e6444eac9c59ce.tar.bz2
implement proper x11osd resize support. that should fix problems with rc4
where parts of the image were not shown under certain circunstances. XV_AUTOPAINT_COLORKEY is now disabled by default. that will permit using colorkey overlays by default with more cards (eg. nvidia). CVS patchset: 6491 CVS date: 2004/05/06 03:09:32
Diffstat (limited to 'src/video_out/video_out_vidix.c')
-rw-r--r--src/video_out/video_out_vidix.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c
index 88f5d055f..1f7fffae8 100644
--- a/src/video_out/video_out_vidix.c
+++ b/src/video_out/video_out_vidix.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_vidix.c,v 1.61 2004/04/26 17:50:11 mroi Exp $
+ * $Id: video_out_vidix.c,v 1.62 2004/05/06 03:09:32 miguelfreitas Exp $
*
* video_out_vidix.c
*
@@ -263,17 +263,26 @@ static void vidix_clean_output_area(vidix_driver_t *this) {
if(this->visual_type == XINE_VISUAL_TYPE_X11) {
#ifdef HAVE_X11
+ int i;
+
XLockDisplay(this->display);
XSetForeground(this->display, this->gc, BlackPixel(this->display, this->screen));
- XFillRectangle(this->display, this->drawable, this->gc, this->sc.border[0].x, this->sc.border[0].y, this->sc.border[0].w, this->sc.border[0].h);
- XFillRectangle(this->display, this->drawable, this->gc, this->sc.border[1].x, this->sc.border[1].y, this->sc.border[1].w, this->sc.border[1].h);
- XFillRectangle(this->display, this->drawable, this->gc, this->sc.border[2].x, this->sc.border[2].y, this->sc.border[2].w, this->sc.border[2].h);
- XFillRectangle(this->display, this->drawable, this->gc, this->sc.border[3].x, this->sc.border[3].y, this->sc.border[3].w, this->sc.border[3].h);
-
+
+ for( i = 0; i < 4; i++ ) {
+ if( this->sc.border[i].w && this->sc.border[i].h ) {
+ XFillRectangle(this->display, this->drawable, this->gc,
+ this->sc.border[i].x, this->sc.border[i].y,
+ this->sc.border[i].w, this->sc.border[i].h);
+ }
+ }
+
XSetForeground(this->display, this->gc, this->colourkey);
XFillRectangle(this->display, this->drawable, this->gc, this->sc.output_xoffset, this->sc.output_yoffset, this->sc.output_width, this->sc.output_height);
+ if (this->xoverlay)
+ x11osd_resize (this->xoverlay, this->sc.gui_width, this->sc.gui_height);
+
XFlush(this->display);
XUnlockDisplay(this->display);
@@ -1127,8 +1136,15 @@ static vo_driver_t *vidix_open_plugin (video_driver_class_t *class_gen, const vo
query_fourccs(this);
XLockDisplay (this->display);
- this->xoverlay = x11osd_create (this->xine, this->display, this->screen,
- this->drawable, X11OSD_SHAPED);
+ if(this->colourkey) {
+ this->xoverlay = x11osd_create (this->xine, this->display, this->screen,
+ this->drawable, X11OSD_COLORKEY);
+ if(this->xoverlay)
+ x11osd_colorkey(this->xoverlay, this->colourkey, &this->sc);
+ } else {
+ this->xoverlay = x11osd_create (this->xine, this->display, this->screen,
+ this->drawable, X11OSD_SHAPED);
+ }
XUnlockDisplay (this->display);
if( this->xoverlay )