4 * This file is part of MPlayer.
6 * MPlayer is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * MPlayer is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #include "libvo/x11_common.h"
30 #include "gui/interface.h"
40 void mplSubDraw( void )
42 if ( appMPlayer
.subWindow
.State
== wsWindowClosed
) exit_player( MSGTR_Exit_quit
);
44 if ( appMPlayer
.subWindow
.State
== wsWindowFocusIn
) SubVisible
++;
45 if ( appMPlayer
.subWindow
.State
== wsWindowFocusOut
&& metacity_hack
!= 3 ) SubVisible
--;
47 if ( !appMPlayer
.subWindow
.Mapped
||
48 appMPlayer
.subWindow
.Visible
== wsWindowNotVisible
) return;
50 if ( guiIntfStruct
.Playing
) mplSubRender
=0;
52 if ( mplSubRender
&& appMPlayer
.subWindow
.State
== wsWindowExpose
)
54 if ( appMPlayer
.sub
.Bitmap
.Image
) wsPutImage( &appMPlayer
.subWindow
);
56 appMPlayer
.subWindow
.State
=0;
59 void mplSubMouseHandle( int Button
,int X
,int Y
,int RX
,int RY
)
61 static int mplSubMoved
= 0;
62 static int msButton
= 0;
69 gtkShow( evShowPopUpMenu
,NULL
);
72 gtkShow( evHidePopUpMenu
,NULL
);
74 msButton
=wsPMMouseButton
;
77 mplHideMenu( RX
,RY
,1 );
82 gtkShow( evHidePopUpMenu
,NULL
);
84 msButton
=wsPLMouseButton
;
92 if ( !appMPlayer
.subWindow
.isFullScreen
) wsMoveWindow( &appMPlayer
.subWindow
,False
,RX
- sx
,RY
- sy
);
95 mplMenuMouseHandle( X
,Y
,RX
,RY
);
97 default: mplPBShow( X
,Y
); break;
100 case wsRLMouseButton
:
101 if ( ( !mplSubMoved
)&&( appMPlayer
.subWindow
.isFullScreen
) )
103 if( SubVisible
++%2 ) wsMoveTopWindow( wsDisplay
,appMPlayer
.mainWindow
.WindowID
);
104 else wsMoveTopWindow( wsDisplay
,appMPlayer
.subWindow
.WindowID
);