diff options
author | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-01 12:02:49 +0000 |
---|---|---|
committer | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-01 12:02:49 +0000 |
commit | 76da393f9842750782dc3e8c7a265efe654dda3a (patch) | |
tree | b201eecb3fcc12e718ad41e689d49ad65aadb948 /libvo/x11_common.c | |
parent | d2d5c0cf705a4759260d675cb228f9db725c3ec3 (diff) | |
download | mpv-76da393f9842750782dc3e8c7a265efe654dda3a.tar.bz2 mpv-76da393f9842750782dc3e8c7a265efe654dda3a.tar.xz |
X11 window aspect patch by Arnaud Boulan <boulan@iie.cnam.fr>
adds 2 options: -keepaspect (default) and -nokeepaspect
tested with icewm and enlightenment
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8693 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 7c674cfa4d..9cd5bee3c7 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -80,6 +80,7 @@ static int vo_old_y = 0; static int vo_old_width = 0; static int vo_old_height = 0; +int vo_x11_keepaspect = 1; #ifdef HAVE_XINERAMA int xinerama_screen = 0; @@ -656,6 +657,15 @@ int vo_x11_check_events(Display *mydisplay){ void vo_x11_sizehint( int x, int y, int width, int height, int max ) { vo_hint.flags=PPosition | PSize | PWinGravity; + if(vo_x11_keepaspect) + { + vo_hint.flags |= PAspect; + vo_hint.min_aspect.x = width; + vo_hint.min_aspect.y = height; + vo_hint.max_aspect.x = width; + vo_hint.max_aspect.y = height; + } + vo_hint.x=x; vo_hint.y=y; vo_hint.width=width; vo_hint.height=height; if ( max ) { |