mirror of https://github.com/mpv-player/mpv
x11_common: add VO_EVENT_MOVE
Add VO_EVENT_MOVE which is required for VOs that interact directly with hardware like MGA and VIDIX. Patch by Dirk Porezag [porezag yahoo com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32454 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
107845e9db
commit
fef7b17c34
|
@ -36,6 +36,7 @@
|
|||
#define VO_EVENT_RESIZE 2
|
||||
#define VO_EVENT_KEYPRESS 4
|
||||
#define VO_EVENT_REINIT 8
|
||||
#define VO_EVENT_MOVE 16
|
||||
|
||||
/* Obsolete: VOCTRL_QUERY_VAA 1 */
|
||||
/* does the device support the required format */
|
||||
|
|
|
@ -766,10 +766,14 @@ void vo_x11_uninit(struct vo *vo)
|
|||
static int check_resize(struct vo *vo)
|
||||
{
|
||||
int old_w = vo->dwidth, old_h = vo->dheight;
|
||||
int old_x = vo->dx, old_y = vo->dy;
|
||||
int rc = 0;
|
||||
vo_x11_update_geometry(vo);
|
||||
if (vo->dwidth != old_w || vo->dheight != old_h)
|
||||
return VO_EVENT_RESIZE;
|
||||
return 0;
|
||||
rc |= VO_EVENT_RESIZE;
|
||||
if (vo->dx != old_x || vo->dy != old_y)
|
||||
rc |= VO_EVENT_MOVE;
|
||||
return rc;
|
||||
}
|
||||
|
||||
int vo_x11_check_events(struct vo *vo)
|
||||
|
|
Loading…
Reference in New Issue