1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-03 13:32:16 +00:00

xinerama fix by attila

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3991 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
atmos4 2002-01-05 08:49:46 +00:00
parent 750bce28b6
commit 71d96baf24
4 changed files with 33 additions and 5 deletions

View File

@ -305,6 +305,9 @@ static uint32_t init( uint32_t width, uint32_t height, uint32_t d_width, uint32_
XSetNormalHints( mDisplay,mWindow,&hint ); XSetNormalHints( mDisplay,mWindow,&hint );
XStoreName( mDisplay,mWindow,mTitle ); XStoreName( mDisplay,mWindow,mTitle );
XMapWindow( mDisplay,mWindow ); XMapWindow( mDisplay,mWindow );
#ifdef HAVE_XINERAMA
vo_x11_xinerama_move(mDisplay,mWindow);
#endif
mGC=XCreateGC( mDisplay,mWindow,GCForeground,&wGCV ); mGC=XCreateGC( mDisplay,mWindow,GCForeground,&wGCV );
#ifdef HAVE_NEW_GUI #ifdef HAVE_NEW_GUI
} }

View File

@ -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); XSetStandardProperties(mDisplay, mywindow, hello, hello, None, NULL, 0, &hint);
if ( mFullscreen ) vo_x11_decoration( mDisplay,mywindow,0 ); if ( mFullscreen ) vo_x11_decoration( mDisplay,mywindow,0 );
XMapWindow(mDisplay, mywindow); XMapWindow(mDisplay, mywindow);
#ifdef HAVE_XINERAMA
vo_x11_xinerama_move(mDisplay,mywindow);
#endif
mygc = XCreateGC(mDisplay, mywindow, 0L, &xgcv); mygc = XCreateGC(mDisplay, mywindow, 0L, &xgcv);
XFlush(mDisplay); XFlush(mDisplay);
XSync(mDisplay, False); XSync(mDisplay, False);

View File

@ -148,15 +148,15 @@ int vo_init( void )
{ {
XineramaScreenInfo *screens; XineramaScreenInfo *screens;
int num_screens; int num_screens;
int disp_screen = mScreen;
mScreen = 0;
screens = XineramaQueryScreens(mDisplay, &num_screens); screens = XineramaQueryScreens(mDisplay, &num_screens);
if (disp_screen > num_screens)
disp_screen = 0;
if (! vo_screenwidth) if (! vo_screenwidth)
vo_screenwidth=screens[disp_screen].width; vo_screenwidth=screens[mScreen].width;
if (! vo_screenheight) if (! vo_screenheight)
vo_screenheight=screens[disp_screen].height; vo_screenheight=screens[mScreen].height;
XFree(screens);
} }
else else
#endif #endif
@ -477,4 +477,22 @@ void saver_off(Display *mDisplay) {
// turning off screensaver // 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 #endif

View File

@ -37,3 +37,7 @@ int vo_x11_check_events(Display *mydisplay);
void saver_off( Display * ); void saver_off( Display * );
void saver_on( Display * ); void saver_on( Display * );
#ifdef HAVE_XINERAMA
void vo_x11_xinerama_move(Display *dsp, Window w);
#endif