summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-05 08:49:46 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-05 08:49:46 +0000
commit71d96baf240f404bb0dd102a7bcab46f7d0bc811 (patch)
treea893418039b4095aea1df89f51ab8ecd0d7a4f9c /libvo
parent750bce28b6c5d73f8dde62cceef0032418d67f13 (diff)
downloadmpv-71d96baf240f404bb0dd102a7bcab46f7d0bc811.tar.bz2
mpv-71d96baf240f404bb0dd102a7bcab46f7d0bc811.tar.xz
xinerama fix by attila
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3991 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_xmga.c3
-rw-r--r--libvo/vo_xv.c3
-rw-r--r--libvo/x11_common.c28
-rw-r--r--libvo/x11_common.h4
4 files changed, 33 insertions, 5 deletions
diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c
index 459f1c4d30..e2c6b7784a 100644
--- a/libvo/vo_xmga.c
+++ b/libvo/vo_xmga.c
@@ -305,6 +305,9 @@ static uint32_t init( uint32_t width, uint32_t height, uint32_t d_width, uint32_
XSetNormalHints( mDisplay,mWindow,&hint );
XStoreName( mDisplay,mWindow,mTitle );
XMapWindow( mDisplay,mWindow );
+#ifdef HAVE_XINERAMA
+ vo_x11_xinerama_move(mDisplay,mWindow);
+#endif
mGC=XCreateGC( mDisplay,mWindow,GCForeground,&wGCV );
#ifdef HAVE_NEW_GUI
}
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index bd89773236..e75f1c211f 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -205,6 +205,9 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t
XSetStandardProperties(mDisplay, mywindow, hello, hello, None, NULL, 0, &hint);
if ( mFullscreen ) vo_x11_decoration( mDisplay,mywindow,0 );
XMapWindow(mDisplay, mywindow);
+#ifdef HAVE_XINERAMA
+ vo_x11_xinerama_move(mDisplay,mywindow);
+#endif
mygc = XCreateGC(mDisplay, mywindow, 0L, &xgcv);
XFlush(mDisplay);
XSync(mDisplay, False);
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 7bd2668400..ea530e60b9 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -148,15 +148,15 @@ int vo_init( void )
{
XineramaScreenInfo *screens;
int num_screens;
- int disp_screen = mScreen;
+
+ mScreen = 0;
screens = XineramaQueryScreens(mDisplay, &num_screens);
- if (disp_screen > num_screens)
- disp_screen = 0;
if (! vo_screenwidth)
- vo_screenwidth=screens[disp_screen].width;
+ vo_screenwidth=screens[mScreen].width;
if (! vo_screenheight)
- vo_screenheight=screens[disp_screen].height;
+ vo_screenheight=screens[mScreen].height;
+ XFree(screens);
}
else
#endif
@@ -477,4 +477,22 @@ void saver_off(Display *mDisplay) {
// turning off screensaver
}
+
+
+#ifdef HAVE_XINERAMA
+void vo_x11_xinerama_move(Display *dsp, Window w)
+{
+ XineramaScreenInfo *screens;
+ int num_screens;
+
+ if(XineramaIsActive(dsp))
+ {
+ screens = XineramaQueryScreens(dsp,&num_screens);
+ /* printf("XXXX Xinerama screen: x: %hd y: %hd\n",screens[mScreen].x_org,screens[mScreen].y_org); */
+ XMoveWindow(dsp,w,screens[mScreen].x_org,screens[mScreen].y_org);
+ XFree(screens);
+ }
+}
+#endif
+
#endif
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index d8266d9679..3ad800c3d1 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -37,3 +37,7 @@ int vo_x11_check_events(Display *mydisplay);
void saver_off( Display * );
void saver_on( Display * );
+
+#ifdef HAVE_XINERAMA
+void vo_x11_xinerama_move(Display *dsp, Window w);
+#endif