summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-08 16:41:44 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-08 16:41:44 +0000
commit1bff6e8bc37081ef8a76c944726219c2cb53413e (patch)
treefdab40e6729842f22940f100536e94f251808c4c
parent8a99b7a507c9cd01127ec5c18970a1e27327517f (diff)
downloadmpv-1bff6e8bc37081ef8a76c944726219c2cb53413e.tar.bz2
mpv-1bff6e8bc37081ef8a76c944726219c2cb53413e.tar.xz
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
-rw-r--r--Gui/wm/ws.c44
-rwxr-xr-xconfigure6
-rw-r--r--libvo/vo_x11.c35
-rw-r--r--libvo/x11_common.c13
-rw-r--r--libvo/x11_common.h15
-rw-r--r--mplayer.c1
6 files changed, 69 insertions, 45 deletions
diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c
index 90e81f0b8f..2b159c5bf5 100644
--- a/Gui/wm/ws.c
+++ b/Gui/wm/ws.c
@@ -961,30 +961,30 @@ void wsIconify( wsTWindow win )
// ----------------------------------------------------------------------------------------------
void wsMoveTopWindow( wsTWindow * win )
{
- if ( wsWMType == wsWMIceWM )
- {
- XUnmapWindow( wsDisplay,win->WindowID );
- XMapWindow( wsDisplay,win->WindowID );
- return;
- }
-/*
- if ( XInternAtom( wsDisplay,"_NET_ACTIVE_WINDOW",False ) != None )
+ switch ( wsWMType )
{
- 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 );
+ 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;
}
- else */
- {
- XMapRaised( wsDisplay,win->WindowID );
- XRaiseWindow( wsDisplay,win->WindowID );
- }
}
// ----------------------------------------------------------------------------------------------
diff --git a/configure b/configure
index f455d9415c..c8fa8496d1 100755
--- a/configure
+++ b/configure
@@ -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"
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 0ed6d0616f..2a346e4da7 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -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
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index c6eb590331..d5cb3bfa7d 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -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:
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index 06c3bc54b7..1aa37b3317 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -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;
diff --git a/mplayer.c b/mplayer.c
index c14d3fc2db..385e119c13 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -354,6 +354,7 @@ void uninit_player(unsigned int mask){
void exit_player(char* how){
uninit_player(INITED_ALL);
+ vo_uninit();
current_module="exit_player";