mirror of
https://github.com/mpv-player/mpv
synced 2025-01-02 21:12:23 +00:00
updating
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8151 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2dc3b7951c
commit
ffc3a58011
@ -599,8 +599,7 @@ int guiGetEvent( int type,char * arg )
|
|||||||
while ( video_out_drivers[i++] )
|
while ( video_out_drivers[i++] )
|
||||||
if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
|
if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
|
||||||
{
|
{
|
||||||
const vo_info_t *info = video_out_drivers[i - 1]->get_info();
|
gaddlist( &video_driver_list,(char *)video_out_drivers[i - 1]->info->short_name );
|
||||||
gaddlist( &video_driver_list,(char *)info->short_name );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -613,8 +612,7 @@ int guiGetEvent( int type,char * arg )
|
|||||||
while ( video_out_drivers[i++] )
|
while ( video_out_drivers[i++] )
|
||||||
if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
|
if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
|
||||||
{
|
{
|
||||||
const vo_info_t *info = video_out_drivers[i - 1]->get_info();
|
if ( ( video_driver_list && !gstrcmp( video_driver_list[0],(char *)video_out_drivers[i - 1]->info->short_name ) )&&( video_out_drivers[i - 1]->control( VOCTRL_GUI_NOWINDOW,NULL ) == VO_TRUE ) )
|
||||||
if ( ( video_driver_list && !gstrcmp( video_driver_list[0],(char *)info->short_name ) )&&( video_out_drivers[i - 1]->control( VOCTRL_GUI_NOWINDOW,NULL ) == VO_TRUE ) )
|
|
||||||
{ guiIntfStruct.NoWindow=True; break; }
|
{ guiIntfStruct.NoWindow=True; break; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
47
Gui/wm/ws.c
47
Gui/wm/ws.c
@ -770,7 +770,7 @@ while(wsTrue){
|
|||||||
|
|
||||||
#define WIN_LAYER_ONBOTTOM 2
|
#define WIN_LAYER_ONBOTTOM 2
|
||||||
#define WIN_LAYER_NORMAL 4
|
#define WIN_LAYER_NORMAL 4
|
||||||
#define WIN_LAYER_ONTOP 6
|
#define WIN_LAYER_ONTOP 10
|
||||||
|
|
||||||
void wsSetLayer( Display * wsDisplay, Window win, int layer )
|
void wsSetLayer( Display * wsDisplay, Window win, int layer )
|
||||||
{
|
{
|
||||||
@ -791,6 +791,29 @@ void wsSetLayer( Display * wsDisplay, Window win, int layer )
|
|||||||
XInternAtom( wsDisplay,"_WIN_LAYER",False ),XA_CARDINAL,32,PropModeReplace,(unsigned char *)&layer,1 );
|
XInternAtom( wsDisplay,"_WIN_LAYER",False ),XA_CARDINAL,32,PropModeReplace,(unsigned char *)&layer,1 );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type=XInternAtom( wsDisplay,"_WIN_SUPPORTING_WM_CHECK",False );
|
||||||
|
if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( int32_t ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char **)&args ) && nitems > 0 )
|
||||||
|
{
|
||||||
|
XClientMessageEvent xev;
|
||||||
|
|
||||||
|
memset( &xev,0,sizeof( xev ) );
|
||||||
|
xev.type=ClientMessage;
|
||||||
|
xev.window=win;
|
||||||
|
xev.message_type=XInternAtom( wsDisplay,"_WIN_LAYER",False );
|
||||||
|
xev.format=32;
|
||||||
|
switch ( layer )
|
||||||
|
{
|
||||||
|
case -1: xev.data.l[0] = WIN_LAYER_ONBOTTOM; break;
|
||||||
|
case 0: xev.data.l[0] = WIN_LAYER_NORMAL; break;
|
||||||
|
case 1: xev.data.l[0] = WIN_LAYER_ONTOP; break;
|
||||||
|
}
|
||||||
|
XSendEvent( wsDisplay,wsRootWin,False,SubstructureNotifyMask,(XEvent*)&xev );
|
||||||
|
if ( layer ) XRaiseWindow( wsDisplay,win );
|
||||||
|
|
||||||
|
XFree( args );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
type=XInternAtom( wsDisplay,"_NET_SUPPORTED",False );
|
type=XInternAtom( wsDisplay,"_NET_SUPPORTED",False );
|
||||||
if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( int32_t ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char **)&args ) && nitems > 0 )
|
if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( int32_t ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char **)&args ) && nitems > 0 )
|
||||||
@ -815,28 +838,6 @@ void wsSetLayer( Display * wsDisplay, Window win, int layer )
|
|||||||
e.xclient.data.l[4]=0l;
|
e.xclient.data.l[4]=0l;
|
||||||
XSendEvent( wsDisplay,wsRootWin,False,SubstructureRedirectMask,&e );
|
XSendEvent( wsDisplay,wsRootWin,False,SubstructureRedirectMask,&e );
|
||||||
|
|
||||||
XFree( args );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
type=XInternAtom( wsDisplay,"_WIN_SUPPORTING_WM_CHECK",False );
|
|
||||||
if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( int32_t ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char **)&args ) && nitems > 0 )
|
|
||||||
{
|
|
||||||
XClientMessageEvent xev;
|
|
||||||
|
|
||||||
memset( &xev,0,sizeof( xev ) );
|
|
||||||
xev.type=ClientMessage;
|
|
||||||
xev.window=win;
|
|
||||||
xev.message_type=XInternAtom( wsDisplay,"_WIN_LAYER",False );
|
|
||||||
xev.format=32;
|
|
||||||
switch ( layer )
|
|
||||||
{
|
|
||||||
case -1: xev.data.l[0] = WIN_LAYER_ONBOTTOM; break;
|
|
||||||
case 0: xev.data.l[0] = WIN_LAYER_NORMAL; break;
|
|
||||||
case 1: xev.data.l[0] = WIN_LAYER_ONTOP; break;
|
|
||||||
}
|
|
||||||
XSendEvent( wsDisplay,wsRootWin,False,SubstructureNotifyMask,(XEvent*)&xev );
|
|
||||||
if ( layer ) XRaiseWindow( wsDisplay,win );
|
|
||||||
|
|
||||||
XFree( args );
|
XFree( args );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user