diff options
-rw-r--r-- | libvo/vo_xmga.c | 3 | ||||
-rw-r--r-- | libvo/vo_xv.c | 3 | ||||
-rw-r--r-- | libvo/x11_common.c | 28 | ||||
-rw-r--r-- | libvo/x11_common.h | 4 |
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 |