diff options
| -rw-r--r-- | doc/html/tqeventloop-h.html | 9 | ||||
| -rw-r--r-- | doc/html/tqeventloop.html | 3 | ||||
| -rw-r--r-- | src/kernel/tqclipboard_x11.cpp | 6 | ||||
| -rw-r--r-- | src/kernel/tqeventloop.cpp | 1 | ||||
| -rw-r--r-- | src/kernel/tqeventloop.h | 9 | ||||
| -rw-r--r-- | src/kernel/tqeventloop_x11.cpp | 10 | ||||
| -rw-r--r-- | src/kernel/tqeventloop_x11_glib.cpp | 8 | 
7 files changed, 23 insertions, 23 deletions
diff --git a/doc/html/tqeventloop-h.html b/doc/html/tqeventloop-h.html index f93652b16..6262140ab 100644 --- a/doc/html/tqeventloop-h.html +++ b/doc/html/tqeventloop-h.html @@ -101,10 +101,11 @@ public:      ~TQEventLoop();      enum ProcessEvents { -	AllEvents		= 0x00, -	ExcludeUserInput	= 0x01, -	ExcludeSocketNotifiers	= 0x02, -	WaitForMore		= 0x04 +	AllEvents              = 0x00, +	ExcludeUserInput       = 0x01, +	ExcludeSocketNotifiers = 0x02, +	WaitForMore            = 0x04, +	ExcludeTimers          = 0x08      };      typedef uint ProcessEventsFlags; diff --git a/doc/html/tqeventloop.html b/doc/html/tqeventloop.html index 267855afe..8605cf653 100644 --- a/doc/html/tqeventloop.html +++ b/doc/html/tqeventloop.html @@ -39,7 +39,7 @@ body { background: #ffffff; color: black; }  <ul>  <li class=fn><a href="#TQEventLoop"><b>TQEventLoop</b></a> ( TQObject * parent = 0, const char * name = 0 )</li>  <li class=fn><a href="#~TQEventLoop"><b>~TQEventLoop</b></a> ()</li> -<li class=fn>enum <a href="#ProcessEvents-enum"><b>ProcessEvents</b></a> { AllEvents = 0x00, ExcludeUserInput = 0x01, ExcludeSocketNotifiers = 0x02, WaitForMore = 0x04 }</li> +<li class=fn>enum <a href="#ProcessEvents-enum"><b>ProcessEvents</b></a> { AllEvents = 0x00, ExcludeUserInput = 0x01, ExcludeSocketNotifiers = 0x02, WaitForMore = 0x04, ExcludeTimers = 0x08 }</li>  <li class=fn>typedef uint <a href="#ProcessEventsFlags"><b>ProcessEventsFlags</b></a></li>  <li class=fn>void <a href="#processEvents"><b>processEvents</b></a> ( ProcessEventsFlags flags, int maxTime )</li>  <li class=fn>virtual bool <a href="#processEvents-2"><b>processEvents</b></a> ( ProcessEventsFlags flags )</li> @@ -93,6 +93,7 @@ it before you create the TQApplication object.  events.  <li><tt>TQEventLoop::WaitForMore</tt> - Wait for events if no pending events  are available. +<li><tt>TQEventLoop::ExcludeTimers</tt> - Do not process timer events.  </ul><p> <p>See also <a href="#processEvents">processEvents</a>().  <h3 class=fn><a name="ProcessEventsFlags"></a>TQEventLoop::ProcessEventsFlags</h3>  diff --git a/src/kernel/tqclipboard_x11.cpp b/src/kernel/tqclipboard_x11.cpp index 16772b491..685837650 100644 --- a/src/kernel/tqclipboard_x11.cpp +++ b/src/kernel/tqclipboard_x11.cpp @@ -502,10 +502,10 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,              if ( started > now )			// crossed midnight                  started = now; -            // 0x08 == ExcludeTimers for X11 only -            tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput | +            tqApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput |                                                TQEventLoop::ExcludeSocketNotifiers | -                                              TQEventLoop::WaitForMore | 0x08 ); +                                              TQEventLoop::WaitForMore | +                                              TQEventLoop::ExcludeTimers);              if ( has_captured_event ) {                  waiting_for_data = FALSE; diff --git a/src/kernel/tqeventloop.cpp b/src/kernel/tqeventloop.cpp index 0cc3036d6..6d6c6c5c2 100644 --- a/src/kernel/tqeventloop.cpp +++ b/src/kernel/tqeventloop.cpp @@ -81,6 +81,7 @@             events.      \value WaitForMore - Wait for events if no pending events             are available. +    \value ExcludeTimers - Do not process X11 timer events.      \sa processEvents()  */ diff --git a/src/kernel/tqeventloop.h b/src/kernel/tqeventloop.h index 32848a53c..311f03c91 100644 --- a/src/kernel/tqeventloop.h +++ b/src/kernel/tqeventloop.h @@ -73,10 +73,11 @@ public:      ~TQEventLoop();      enum ProcessEvents { -	AllEvents		= 0x00, -	ExcludeUserInput	= 0x01, -	ExcludeSocketNotifiers	= 0x02, -	WaitForMore		= 0x04 +	AllEvents              = 0x00, +	ExcludeUserInput       = 0x01, +	ExcludeSocketNotifiers = 0x02, +	WaitForMore            = 0x04, +	ExcludeTimers          = 0x08      };      typedef uint ProcessEventsFlags; diff --git a/src/kernel/tqeventloop_x11.cpp b/src/kernel/tqeventloop_x11.cpp index 13ba8c6af..b64b22287 100644 --- a/src/kernel/tqeventloop_x11.cpp +++ b/src/kernel/tqeventloop_x11.cpp @@ -206,8 +206,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )      TQApplication::sendPostedEvents(); -    const uint exclude_all = ExcludeSocketNotifiers | 0x08; -    // 0x08 == ExcludeTimers for X11 only +    const uint exclude_all = ExcludeSocketNotifiers | ExcludeTimers;      if ( nevents > 0 && ( flags & exclude_all ) == exclude_all &&  	 ( flags & WaitForMore ) ) {  	return TRUE; @@ -221,8 +220,8 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )      // return the maximum time we can wait for an event.      static timeval zerotm;      timeval *tm = 0; -    if ( ! ( flags & 0x08 ) ) {			// 0x08 == ExcludeTimers for X11 only -	tm = qt_wait_timer();			// wait for timer or X event +    if ( ! ( flags & ExcludeTimers ) ) { +	tm = qt_wait_timer();			// wait for TQt timers  	if ( !canWait ) {  	    if ( !tm )  		tm = &zerotm; @@ -391,8 +390,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )      }      // activate timers -    if ( ! ( flags & 0x08 ) ) { -	// 0x08 == ExcludeTimers for X11 only +    if ( ! ( flags & ExcludeTimers ) ) {  	nevents += activateTimers();      } diff --git a/src/kernel/tqeventloop_x11_glib.cpp b/src/kernel/tqeventloop_x11_glib.cpp index 3608091b5..9d18d1073 100644 --- a/src/kernel/tqeventloop_x11_glib.cpp +++ b/src/kernel/tqeventloop_x11_glib.cpp @@ -376,8 +376,7 @@ bool TQEventLoop::processX11Events()  	TQApplication::sendPostedEvents(); -	const uint exclude_all = ExcludeSocketNotifiers | 0x08; -	// 0x08 == ExcludeTimers for X11 only +	const uint exclude_all = ExcludeSocketNotifiers | ExcludeTimers;  	if ( nevents > 0 && ( flags & exclude_all ) == exclude_all && ( flags & WaitForMore ) ) {  		return TRUE;  	} @@ -407,7 +406,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)  	// return the maximum time we can wait for an event.  	static timeval zerotm;  	timeval *tm = 0; -	if ( ! ( flags & 0x08 ) ) {				// 0x08 == ExcludeTimers for X11 only +	if ( ! ( flags & ExcludeTimers ) ) {  		if (TQApplication::isGuiThread()) {  			tm = qt_wait_timer();				// wait for TQt timers  			if ( !canWait ) { @@ -605,8 +604,7 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) {  	}  	// activate timers -	if ( ! ( flags & 0x08 ) ) { -		// 0x08 == ExcludeTimers for X11 only +	if ( ! ( flags & ExcludeTimers ) ) {  		if (TQApplication::isGuiThread()) {  			nevents += activateTimers();  		}  | 
