comparison gui/wm/ws.c @ 31006:768242ad42e2

Remove unused static function wsDummyEvents and related unused code, fixes: gui/wm/ws.c:710: warning: 'wsDummyEvents' defined but not used
author diego
date Tue, 20 Apr 2010 08:55:04 +0000
parents 0878f2429673
children c69ecf7d80a4
comparison
equal deleted inserted replaced
31005:0878f2429673 31006:768242ad42e2
698 XFlush( wsDisplay ); 698 XFlush( wsDisplay );
699 XSync( wsDisplay,False ); 699 XSync( wsDisplay,False );
700 return !wsTrue; 700 return !wsTrue;
701 } 701 }
702 702
703 static Bool wsDummyEvents( Display * display, XEvent * Event, XPointer arg )
704 { return True; }
705
706 void wsHandleEvents( void ){ 703 void wsHandleEvents( void ){
707 // handle pending events 704 // handle pending events
708 while ( XPending(wsDisplay) ){ 705 while ( XPending(wsDisplay) ){
709 XNextEvent( wsDisplay,&wsEvent ); 706 XNextEvent( wsDisplay,&wsEvent );
710 // printf("### X event: %d [%d]\n",wsEvent.type,delay); 707 // printf("### X event: %d [%d]\n",wsEvent.type,delay);
717 int delay=20; 714 int delay=20;
718 mp_msg( MSGT_GPLAYER,MSGL_V,"[ws] init threads: %d\n",XInitThreads() ); 715 mp_msg( MSGT_GPLAYER,MSGL_V,"[ws] init threads: %d\n",XInitThreads() );
719 XSynchronize( wsDisplay,False ); 716 XSynchronize( wsDisplay,False );
720 XLockDisplay( wsDisplay ); 717 XLockDisplay( wsDisplay );
721 // XIfEvent( wsDisplay,&wsEvent,wsEvents,NULL ); 718 // XIfEvent( wsDisplay,&wsEvent,wsEvents,NULL );
722
723 #if 1
724 719
725 while(wsTrue){ 720 while(wsTrue){
726 // handle pending events 721 // handle pending events
727 while ( XPending(wsDisplay) ){ 722 while ( XPending(wsDisplay) ){
728 XNextEvent( wsDisplay,&wsEvent ); 723 XNextEvent( wsDisplay,&wsEvent );
730 delay=0; 725 delay=0;
731 } 726 }
732 usleep(delay*1000); // FIXME! 727 usleep(delay*1000); // FIXME!
733 if(delay<10*20) delay+=20; // pump up delay up to 0.2 sec (low activity) 728 if(delay<10*20) delay+=20; // pump up delay up to 0.2 sec (low activity)
734 } 729 }
735
736 #else
737
738 while( wsTrue )
739 {
740 XIfEvent( wsDisplay,&wsEvent,wsDummyEvents,NULL );
741 wsEvents( wsDisplay,&wsEvent,NULL );
742 }
743 #endif
744 730
745 XUnlockDisplay( wsDisplay ); 731 XUnlockDisplay( wsDisplay );
746 } 732 }
747 733
748 // ---------------------------------------------------------------------------------------------- 734 // ----------------------------------------------------------------------------------------------