Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 7558:f89b4a70dbda
warning fix - hope it don't break it
author | arpi |
---|---|
date | Sun, 29 Sep 2002 19:23:21 +0000 |
parents | 77980ab4e296 |
children |
rev | line source |
---|---|
1693 | 1 |
2 // sub window | |
3 | |
6794 | 4 int mplSubRender = 0; |
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 |
6794 | 19 if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose ) |
1693 | 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 { | |
6651 | 33 case wsPRMouseButton: |
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; |
6651 | 36 case wsPMMouseButton: |
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 ); |
6651 | 39 msButton=wsPMMouseButton; |
1693 | 40 break; |
6651 | 41 case wsRMMouseButton: |
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; |
6651 | 59 case wsPMMouseButton: |
1693 | 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 } |