summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-11 16:45:25 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-11 16:45:25 +0000
commit595ab25d2120271bc0caaee304ba542dd7fe6739 (patch)
tree4afc07949fa8a254499d97ec384aff6682864fb0 /libvo/x11_common.c
parenteee729121ed0c07619bd5cde2bbe0092f106ec86 (diff)
downloadmpv-595ab25d2120271bc0caaee304ba542dd7fe6739.tar.bz2
mpv-595ab25d2120271bc0caaee304ba542dd7fe6739.tar.xz
xinerama: allow to override xinerama screen_w/screen_h and setting size of screen where the window is placed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3462 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r--libvo/x11_common.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 446c14cbcd..1e1fed1411 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -144,9 +144,15 @@ int vo_init( void )
{
XineramaScreenInfo *screens;
int num_screens;
+ int disp_screen = mScreen;
+
screens = XineramaQueryScreens(mDisplay, &num_screens);
- vo_screenwidth=screens[0].width;
- vo_screenheight=screens[0].height;
+ if (disp_screen > num_screens)
+ disp_screen = 0;
+ if (! vo_screenwidth)
+ vo_screenwidth=screens[disp_screen].width;
+ if (! vo_screenheight)
+ vo_screenheight=screens[disp_screen].height;
}
else
#endif