mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:33:46 +01:00
some bugfix, x[11|mga|v] ( fullscreen with more files )
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6014 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8a99b7a507
commit
1bff6e8bc3
44
Gui/wm/ws.c
44
Gui/wm/ws.c
@ -961,30 +961,30 @@ void wsIconify( wsTWindow win )
|
||||
// ----------------------------------------------------------------------------------------------
|
||||
void wsMoveTopWindow( wsTWindow * win )
|
||||
{
|
||||
if ( wsWMType == wsWMIceWM )
|
||||
switch ( wsWMType )
|
||||
{
|
||||
XUnmapWindow( wsDisplay,win->WindowID );
|
||||
XMapWindow( wsDisplay,win->WindowID );
|
||||
return;
|
||||
case wsWMIceWM:
|
||||
XUnmapWindow( wsDisplay,win->WindowID );
|
||||
XMapWindow( wsDisplay,win->WindowID );
|
||||
break;
|
||||
case wsWMNetWM:
|
||||
case wsWMKDE:
|
||||
{
|
||||
XEvent e;
|
||||
e.xclient.type=ClientMessage;
|
||||
e.xclient.message_type=XInternAtom( wsDisplay,"_NET_ACTIVE_WINDOW",False );
|
||||
e.xclient.display=wsDisplay;
|
||||
e.xclient.window=win->WindowID;
|
||||
e.xclient.format=32;
|
||||
e.xclient.data.l[0]=0;
|
||||
XSendEvent( wsDisplay,wsRootWin,False,SubstructureRedirectMask,&e );
|
||||
break;
|
||||
}
|
||||
default:
|
||||
XMapRaised( wsDisplay,win->WindowID );
|
||||
XRaiseWindow( wsDisplay,win->WindowID );
|
||||
break;
|
||||
}
|
||||
/*
|
||||
if ( XInternAtom( wsDisplay,"_NET_ACTIVE_WINDOW",False ) != None )
|
||||
{
|
||||
XEvent e;
|
||||
|
||||
e.xclient.type=ClientMessage;
|
||||
e.xclient.message_type=XInternAtom( wsDisplay,"_NET_ACTIVE_WINDOW",False );
|
||||
e.xclient.display=wsDisplay;
|
||||
e.xclient.window=win->WindowID;
|
||||
e.xclient.format=32;
|
||||
e.xclient.data.l[0]=0;
|
||||
XSendEvent( wsDisplay,wsRootWin,False,SubstructureRedirectMask,&e );
|
||||
}
|
||||
else */
|
||||
{
|
||||
XMapRaised( wsDisplay,win->WindowID );
|
||||
XRaiseWindow( wsDisplay,win->WindowID );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------------
|
||||
|
6
configure
vendored
6
configure
vendored
@ -113,6 +113,8 @@ Installation directories:
|
||||
data files (fonts, skins) [PREFIX/share/mplayer]
|
||||
--confdir=DIR use this prefix for installing configuration files
|
||||
[same as datadir]
|
||||
--libdir=DIR use this prefix for object code libraries
|
||||
[PREFIX/lib]
|
||||
|
||||
Optional features:
|
||||
--disable-mencoder disable mencoder [autodetect]
|
||||
@ -1066,7 +1068,9 @@ for ac_option do
|
||||
--confdir=*)
|
||||
_confdir=`echo $ac_option | cut -d '=' -f 2`
|
||||
;;
|
||||
|
||||
--libdir=*)
|
||||
_libdir=`echo $ac_option | cut -d '=' -f 2`
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown parameter: $ac_option"
|
||||
|
@ -45,6 +45,11 @@ LIBVO_EXTERN( x11 )
|
||||
|
||||
#include "../mp_msg.h"
|
||||
|
||||
#ifdef HAVE_NEW_GUI
|
||||
#include "../Gui/interface.h"
|
||||
#include "../mplayer.h"
|
||||
#endif
|
||||
|
||||
static vo_info_t vo_info =
|
||||
{
|
||||
"X11 ( XImage/Shm )",
|
||||
@ -91,6 +96,9 @@ static int srcW=-1;
|
||||
static int srcH=-1;
|
||||
static int aspect; // 1<<16 based fixed point aspect, so that the aspect stays correct during resizing
|
||||
|
||||
static int old_vo_dwidth=-1;
|
||||
static int old_vo_dheight=-1;
|
||||
|
||||
static void check_events(){
|
||||
int ret = vo_x11_check_events(mDisplay);
|
||||
|
||||
@ -243,6 +251,9 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
|
||||
|
||||
|
||||
vo_mouse_autohide=1;
|
||||
old_vo_dwidth=-1;
|
||||
old_vo_dheight=-1;
|
||||
|
||||
if (!title)
|
||||
title = strdup("MPlayer X11 (XImage/Shm) render");
|
||||
|
||||
@ -260,7 +271,7 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
|
||||
|
||||
//printf( "w: %d h: %d\n\n",vo_dwidth,vo_dheight );
|
||||
|
||||
XGetWindowAttributes( mDisplay,DefaultRootWindow( mDisplay ),&attribs );
|
||||
XGetWindowAttributes( mDisplay,mRootWin,&attribs );
|
||||
depth=attribs.depth;
|
||||
|
||||
if ( depth != 15 && depth != 16 && depth != 24 && depth != 32 ) depth=24;
|
||||
@ -275,18 +286,19 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
|
||||
aspect= ((1<<16)*d_width + d_height/2)/d_height;
|
||||
|
||||
#ifdef HAVE_NEW_GUI
|
||||
if ( vo_window == None )
|
||||
if(use_gui) guiGetEvent( guiSetShVideo,0 ); // the GUI will set up / resize the window
|
||||
else
|
||||
#endif
|
||||
{
|
||||
hint.x=0;
|
||||
hint.y=0;
|
||||
if(zoomFlag){
|
||||
hint.width=d_width;
|
||||
hint.height=d_height;
|
||||
}else{
|
||||
hint.width=width;
|
||||
hint.height=height;
|
||||
}
|
||||
// if(zoomFlag){
|
||||
// hint.width=d_width;
|
||||
// hint.height=d_height;
|
||||
// }else{
|
||||
// hint.width=width;
|
||||
// hint.height=height;
|
||||
// }
|
||||
|
||||
#ifdef HAVE_XF86VM
|
||||
if ( vm )
|
||||
@ -468,8 +480,6 @@ static uint32_t draw_slice( uint8_t *src[],int stride[],int w,int h,int x,int y
|
||||
{
|
||||
uint8_t *dst[3];
|
||||
int dstStride[3];
|
||||
static int old_vo_dwidth=-1;
|
||||
static int old_vo_dheight=-1;
|
||||
|
||||
if((old_vo_dwidth != vo_dwidth || old_vo_dheight != vo_dheight) /*&& y==0*/ && zoomFlag)
|
||||
{
|
||||
@ -602,6 +612,7 @@ uninit(void)
|
||||
vo_vm_close(mDisplay);
|
||||
#endif
|
||||
|
||||
zoomFlag=0;
|
||||
vo_x11_uninit(mDisplay, vo_window);
|
||||
|
||||
freeSwsContext(swsContext);
|
||||
@ -616,7 +627,7 @@ static uint32_t preinit(const char *arg)
|
||||
}
|
||||
|
||||
#ifdef HAVE_NEW_GUI
|
||||
if ( vo_window == None )
|
||||
if ( !use_gui )
|
||||
#endif
|
||||
if( !vo_init() ) return -1; // Can't open X11
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#ifdef HAVE_NEW_GUI
|
||||
#include "../Gui/interface.h"
|
||||
#include "../mplayer.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -355,6 +356,12 @@ int vo_init( void )
|
||||
return 1;
|
||||
}
|
||||
|
||||
void vo_uninit( void )
|
||||
{
|
||||
printf("vo: uninit ...\n" );
|
||||
if( !vo_depthonscreen ) return;
|
||||
XCloseDisplay( mDisplay );
|
||||
}
|
||||
|
||||
#include "../linux/keycodes.h"
|
||||
#include "wskeys.h"
|
||||
@ -507,14 +514,14 @@ int vo_x11_uninit(Display *display, Window window)
|
||||
|
||||
#ifdef HAVE_NEW_GUI
|
||||
/* destroy window only if it's not controlled by GUI */
|
||||
if (vo_window == None)
|
||||
if ( !use_gui )
|
||||
#endif
|
||||
{
|
||||
/* and -wid is set */
|
||||
if (!(WinID > 0))
|
||||
XDestroyWindow(display, window);
|
||||
XCloseDisplay(display);
|
||||
vo_depthonscreen = 0;
|
||||
vo_fs=0;
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
@ -721,7 +728,7 @@ void vo_x11_fullscreen( void )
|
||||
// vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 );
|
||||
break;
|
||||
case vo_wm_Unknown:
|
||||
vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 );
|
||||
// vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 );
|
||||
XUnmapWindow( mDisplay,vo_window );
|
||||
break;
|
||||
case vo_wm_IceWM:
|
||||
|
@ -25,14 +25,15 @@ extern int WinID;
|
||||
extern int vo_mouse_timer_const;
|
||||
extern int vo_mouse_autohide;
|
||||
|
||||
int vo_init( void );
|
||||
int vo_hidecursor ( Display* , Window );
|
||||
extern int vo_init( void );
|
||||
extern void vo_uninit( void );
|
||||
extern int vo_hidecursor ( Display* , Window );
|
||||
extern void vo_showcursor( Display *disp, Window win );
|
||||
void vo_x11_decoration( Display * vo_Display,Window w,int d );
|
||||
void vo_x11_classhint( Display * display,Window window,char *name );
|
||||
void vo_x11_sizehint( int x, int y, int width, int height, int max );
|
||||
int vo_x11_check_events(Display *mydisplay);
|
||||
void vo_x11_fullscreen( void );
|
||||
extern void vo_x11_decoration( Display * vo_Display,Window w,int d );
|
||||
extern void vo_x11_classhint( Display * display,Window window,char *name );
|
||||
extern void vo_x11_sizehint( int x, int y, int width, int height, int max );
|
||||
extern int vo_x11_check_events(Display *mydisplay);
|
||||
extern void vo_x11_fullscreen( void );
|
||||
#endif
|
||||
|
||||
extern Window vo_window;
|
||||
|
Loading…
Reference in New Issue
Block a user