Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 6624:122efdee5b52
sync
author | nexus |
---|---|
date | Wed, 03 Jul 2002 08:06:43 +0000 |
parents | 7bc4c6ba9485 |
children | 8f49c75a2824 |
rev | line source |
---|---|
1693 | 1 |
2 // sub window | |
3 | |
4 int mplSubRender = 1; | |
1852 | 5 int SubVisible = 0; |
1812 | 6 |
1693 | 7 void mplSubDraw( wsParamDisplay ) |
8 { | |
5919 | 9 if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); |
10 | |
2045 | 11 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++; |
6622
da08877b9512
fix window hiding bug with some wms (kde, gnome, icewm, mwm, wmaker)
pontscho
parents:
6619
diff
changeset
|
12 if ( appMPlayer.subWindow.State == wsWindowFocusOut && wsWMType != wsWMKDE && wsWMType != wsWMIceWM ) SubVisible--; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
13 |
1852 | 14 if ( !appMPlayer.subWindow.Mapped || |
15 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; | |
1823 | 16 |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
17 if ( guiIntfStruct.Playing ) mplSubRender=0; |
1693 | 18 |
19 if ( mplSubRender ) | |
20 { | |
2029 | 21 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); |
1693 | 22 } |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
23 appMPlayer.subWindow.State=0; |
1693 | 24 } |
25 | |
26 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
27 { | |
1812 | 28 static int mplSubMoved = 0; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
29 static int msButton = 0; |
1812 | 30 |
1693 | 31 switch( Button ) |
32 { | |
2902
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
33 case wsPMMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
34 gtkShow( evShowPopUpMenu,NULL ); |
2980 | 35 break; |
1693 | 36 case wsPRMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
37 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 38 mplShowMenu( RX,RY ); |
39 msButton=wsPRMouseButton; | |
40 break; | |
41 case wsRRMouseButton: | |
5919 | 42 mplHideMenu( RX,RY,1 ); |
1693 | 43 msButton=0; |
44 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
45 // --- |
1693 | 46 case wsPLMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
47 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 48 sx=X; sy=Y; |
49 msButton=wsPLMouseButton; | |
50 mplSubMoved=0; | |
51 break; | |
52 case wsMoveMouse: | |
53 switch ( msButton ) | |
54 { | |
55 case wsPLMouseButton: | |
56 mplSubMoved=1; | |
2854 | 57 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 58 break; |
59 case wsPRMouseButton: | |
60 mplMenuMouseHandle( X,Y,RX,RY ); | |
61 break; | |
62 } | |
63 break; | |
64 case wsRLMouseButton: | |
5997
b5fb9a927bf3
add WM detection, and wm specific fullscreen code. (???)
pontscho
parents:
5919
diff
changeset
|
65 if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) ) |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
66 { |
6146 | 67 if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID ); |
6622
da08877b9512
fix window hiding bug with some wms (kde, gnome, icewm, mwm, wmaker)
pontscho
parents:
6619
diff
changeset
|
68 else if ( wsWMType != wsWMNetWM && wsWMType != wsWMKDE ) wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID ); |
6623 | 69 } |
1693 | 70 msButton=0; |
71 mplSubMoved=0; | |
72 break; | |
73 } | |
74 } |