diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-06-11 13:39:33 +0900 | 
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-06-13 10:41:50 +0900 | 
| commit | d7d6cb215181eaa02e5aea89149fc2c6d702ddc5 (patch) | |
| tree | 14841da7f4dd22cf5ea437b2d7b03beefd2567ff /src | |
| parent | 5e1b31056073d2f8f72161970b5df5f81dac619a (diff) | |
| download | tqt-d7d6cb215181eaa02e5aea89149fc2c6d702ddc5.tar.gz tqt-d7d6cb215181eaa02e5aea89149fc2c6d702ddc5.zip | |
Explicitly add 'ExcludeTimers' to 'ProcessEvent' enum
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 5e8114b6f0ce10965a69cab4a61ce369cbb21d21)
Diffstat (limited to 'src')
| -rw-r--r-- | src/kernel/ntqeventloop.h | 9 | ||||
| -rw-r--r-- | src/kernel/qclipboard_x11.cpp | 6 | ||||
| -rw-r--r-- | src/kernel/qeventloop.cpp | 1 | ||||
| -rw-r--r-- | src/kernel/qeventloop_x11.cpp | 10 | ||||
| -rw-r--r-- | src/kernel/qeventloop_x11_glib.cpp | 8 | 
5 files changed, 16 insertions, 18 deletions
| diff --git a/src/kernel/ntqeventloop.h b/src/kernel/ntqeventloop.h index deca8d061..99c4ed499 100644 --- a/src/kernel/ntqeventloop.h +++ b/src/kernel/ntqeventloop.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/qclipboard_x11.cpp b/src/kernel/qclipboard_x11.cpp index d0571fc5a..ae5e093a8 100644 --- a/src/kernel/qclipboard_x11.cpp +++ b/src/kernel/qclipboard_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/qeventloop.cpp b/src/kernel/qeventloop.cpp index 402894f2a..b52f5a605 100644 --- a/src/kernel/qeventloop.cpp +++ b/src/kernel/qeventloop.cpp @@ -83,6 +83,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/qeventloop_x11.cpp b/src/kernel/qeventloop_x11.cpp index 1ba3b21df..163f8d771 100644 --- a/src/kernel/qeventloop_x11.cpp +++ b/src/kernel/qeventloop_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/qeventloop_x11_glib.cpp b/src/kernel/qeventloop_x11_glib.cpp index 695232c2e..529ea08b2 100644 --- a/src/kernel/qeventloop_x11_glib.cpp +++ b/src/kernel/qeventloop_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();  		} | 
