diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-27 00:55:25 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-27 00:55:25 +0000 |
commit | 3cfd8b016170e0f560bffe4e7ea6bd741becefeb (patch) | |
tree | 6492d7b8be402d7c684d88534a86ed1598cb6668 /Gui | |
parent | 33e22982882d10b7767c2994595a86437873cc6a (diff) | |
download | mpv-3cfd8b016170e0f560bffe4e7ea6bd741becefeb.tar.bz2 mpv-3cfd8b016170e0f560bffe4e7ea6bd741becefeb.tar.xz |
GUI integration, step 1
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1710 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r-- | Gui/mplayer/mplayer.c | 8 | ||||
-rw-r--r-- | Gui/wm/ws.c | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/Gui/mplayer/mplayer.c b/Gui/mplayer/mplayer.c index 66bff1f521..52d04ea665 100644 --- a/Gui/mplayer/mplayer.c +++ b/Gui/mplayer/mplayer.c @@ -108,7 +108,11 @@ void mplInit( int argc,char* argv[], char *envp[] ) // timerSetHandler( mplTimerHandler ); // various timer hacks // timerInit(); - wsMainLoop(); // X event handler (calls mplTimerHandler periodically!) +// wsMainLoop(); // X event handler (calls mplTimerHandler periodically!) + +} + +void mplDone(){ dbprintf( 1,"[mplayer] exit.\n" ); @@ -116,4 +120,6 @@ void mplInit( int argc,char* argv[], char *envp[] ) // timerDone(); gtkDone(); // kills the gtkThreadProc() process wsXDone(); + } + diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c index 32d27687cf..4922d8998a 100644 --- a/Gui/wm/ws.c +++ b/Gui/wm/ws.c @@ -631,6 +631,16 @@ buttonreleased: Bool wsDummyEvents( Display * display,XEvent * Event,XPointer arg ) { return True; } +// mplTimerHandler(0); // handle timer event +void wsHandleEvents(){ + // handle pending events + while ( XPending(wsDisplay) ){ + XNextEvent( wsDisplay,&wsEvent ); +// printf("### X event: %d [%d]\n",wsEvent.type,delay); + wsEvents( wsDisplay,&wsEvent,NULL ); + } +} + void wsMainLoop( void ) { int delay=20; |