summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-10 01:48:54 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-10 01:48:54 +0000
commiteb3e904f7c94bdf3fd129a3b5f8fa90c6f42ae9e (patch)
tree6b3bcd9ca89ec1c98f0be7b93f6857ad9a067493 /libvo
parent81b1e475795e42f2968542bc73ad6db1eb9e5e78 (diff)
downloadmpv-eb3e904f7c94bdf3fd129a3b5f8fa90c6f42ae9e.tar.bz2
mpv-eb3e904f7c94bdf3fd129a3b5f8fa90c6f42ae9e.tar.xz
Xinerama screen size fix by Lev Babiev <harley@hosers.org>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2150 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/x11_common.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 897e1b5c28..0cc54e5258 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -21,6 +21,9 @@
#include <X11/extensions/dpms.h>
#endif
+#ifdef HAVE_XINERAMA
+#include <X11/extensions/Xinerama.h>
+#endif
/*
* If SCAN_VISUALS is defined, vo_init() scans all available TrueColor
@@ -135,9 +138,22 @@ int vo_init( void )
}
mScreen=DefaultScreen( mDisplay ); // Screen ID.
mRootWin=RootWindow( mDisplay,mScreen );// Root window ID.
+
+#ifdef HAVE_XINERAMA
+ if(XineramaIsActive(mDisplay))
+ {
+ XineramaScreenInfo *screens;
+ int num_screens;
+ screens = XineramaQueryScreens(mDisplay, &num_screens);
+ vo_screenwidth=screens[0].width;
+ vo_screenheight=screens[0].height;
+ }
+ else
+#endif
+ {
vo_screenwidth=DisplayWidth( mDisplay,mScreen );
vo_screenheight=DisplayHeight( mDisplay,mScreen );
-
+ }
// get color depth (from root window, or the best visual):
XGetWindowAttributes(mDisplay, mRootWin, &attribs);
depth=attribs.depth;