diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-06-10 09:30:59 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-06-10 09:30:59 +0000 |
commit | 5e9f0b59756096481c79654fc1d0102428e9bed9 (patch) | |
tree | a2638baa8ae1d2c36e28a902c54a031a744a73b8 /src | |
parent | ba193619aa99fc62cbc68197b554780524f349a1 (diff) | |
download | xine-lib-5e9f0b59756096481c79654fc1d0102428e9bed9.tar.gz xine-lib-5e9f0b59756096481c79654fc1d0102428e9bed9.tar.bz2 |
proper expose event handling
CVS patchset: 154
CVS date: 2001/06/10 09:30:59
Diffstat (limited to 'src')
-rw-r--r-- | src/video_out/video_out_xshm.c | 28 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 21 |
2 files changed, 30 insertions, 19 deletions
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 890108452..a2972896b 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.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_xshm.c,v 1.5 2001/06/10 01:47:29 guenter Exp $ + * $Id: video_out_xshm.c,v 1.6 2001/06/10 09:30:59 guenter Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -661,18 +661,24 @@ static int xshm_gui_data_exchange (vo_driver_t *this_gen, if (this->cur_frame) { - if (this->use_shm) { + XExposeEvent * xev = (XExposeEvent *) data; - XShmPutImage(this->display, - this->drawable, this->gc, this->cur_frame->image, - 0, 0, this->cur_frame->width, this->cur_frame->height, - this->cur_frame->width, this->cur_frame->height, False); + if (xev->count == 0) { + + if (this->use_shm) { + + XShmPutImage(this->display, + this->drawable, this->gc, this->cur_frame->image, + 0, 0, this->output_xoffset, this->output_yoffset, + this->cur_frame->rgb_width, this->cur_frame->rgb_height, + False); - } else { - XPutImage(this->display, - this->drawable, this->gc, this->cur_frame->image, - 0, 0, this->cur_frame->width, this->cur_frame->height, - this->cur_frame->width, this->cur_frame->height); + } else { + XPutImage(this->display, + this->drawable, this->gc, this->cur_frame->image, + 0, 0, this->output_xoffset, this->output_yoffset, + this->cur_frame->rgb_width, this->cur_frame->rgb_height); + } } } diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 9a64f36e0..bc3878a23 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.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_xv.c,v 1.38 2001/06/10 02:07:28 guenter Exp $ + * $Id: video_out_xv.c,v 1.39 2001/06/10 09:30:59 guenter Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -574,16 +574,21 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, } break; - case GUI_DATA_EX_EXPOSE_EVENT: + case GUI_DATA_EX_EXPOSE_EVENT: { + + XExposeEvent * xev = (XExposeEvent *) data; /* FIXME : take care of completion events */ - if (this->cur_frame) - XvShmPutImage(this->display, this->xv_port, - this->drawable, this->gc, this->cur_frame->image, - 0, 0, this->cur_frame->width, this->cur_frame->height-5, - this->output_xoffset, this->output_yoffset, - this->output_width, this->output_height, False); + if (xev->count == 0) { + if (this->cur_frame) + XvShmPutImage(this->display, this->xv_port, + this->drawable, this->gc, this->cur_frame->image, + 0, 0, this->cur_frame->width, this->cur_frame->height-5, + this->output_xoffset, this->output_yoffset, + this->output_width, this->output_height, False); + } + } break; case GUI_DATA_EX_DRAWABLE_CHANGED: |