From a5d6dca3e98ea1664be267c089a47766ce7e0a48 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Mon, 24 Oct 2011 16:04:07 +0100 Subject: Fix for fdo41997 continuation of VCL cleanup --- vcl/aqua/source/app/salinst.cxx | 10 +++++----- vcl/headless/svpinst.cxx | 2 +- vcl/inc/vcl/apptypes.hxx | 12 ++++++------ vcl/inc/vcl/svapp.hxx | 2 +- vcl/ios/source/app/salinst.cxx | 6 +++--- vcl/unx/generic/app/salinst.cxx | 9 ++++----- vcl/unx/gtk/app/gtkinst.cxx | 10 +++++----- vcl/win/source/app/salinst.cxx | 10 +++++----- 8 files changed, 30 insertions(+), 31 deletions(-) (limited to 'vcl') diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index 63d657ce4f39..4ef19f938749 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -854,15 +854,15 @@ void AquaSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents ) bool AquaSalInstance::AnyInput( sal_uInt16 nType ) { - if( nType & INPUT_APPEVENT ) + if( nType & VCL_INPUT_APPEVENT ) { if( ! aAppEventList.empty() ) return true; - if( nType == INPUT_APPEVENT ) + if( nType == VCL_INPUT_APPEVENT ) return false; } - if( nType & INPUT_TIMER ) + if( nType & VCL_INPUT_TIMER ) { if( AquaSalTimer::pRunningTimer ) { @@ -885,9 +885,9 @@ bool AquaSalInstance::AnyInput( sal_uInt16 nType ) NSMouseEnteredMask | NSMouseExitedMask; if( nType & VCL_INPUT_KEYBOARD) nEventMask |= NSKeyDownMask | NSKeyUpMask | NSFlagsChangedMask; - if( nType & INPUT_OTHER) + if( nType & VCL_INPUT_OTHER) nEventMask |= NSTabletPoint; - // TODO: INPUT_PAINT / more INPUT_OTHER + // TODO: VCL_INPUT_PAINT / more VCL_INPUT_OTHER if( !nType) return false; diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 9c0eb6ea0430..ad58bc5bcb00 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -397,7 +397,7 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents ) bool SvpSalInstance::AnyInput( sal_uInt16 nType ) { - if( (nType & INPUT_TIMER) != 0 ) + if( (nType & VCL_INPUT_TIMER) != 0 ) return CheckTimeout( false ); return false; } diff --git a/vcl/inc/vcl/apptypes.hxx b/vcl/inc/vcl/apptypes.hxx index a52b2e99597b..e9f3dd711edf 100644 --- a/vcl/inc/vcl/apptypes.hxx +++ b/vcl/inc/vcl/apptypes.hxx @@ -57,12 +57,12 @@ public: #define VCL_INPUT_MOUSE 0x0001 #define VCL_INPUT_KEYBOARD 0x0002 -#define INPUT_PAINT 0x0004 -#define INPUT_TIMER 0x0008 -#define INPUT_OTHER 0x0010 -#define INPUT_APPEVENT 0x0020 -#define INPUT_MOUSEANDKEYBOARD (VCL_INPUT_MOUSE | VCL_INPUT_KEYBOARD) -#define INPUT_ANY (INPUT_MOUSEANDKEYBOARD | INPUT_PAINT | INPUT_TIMER | INPUT_OTHER | INPUT_APPEVENT) +#define VCL_INPUT_PAINT 0x0004 +#define VCL_INPUT_TIMER 0x0008 +#define VCL_INPUT_OTHER 0x0010 +#define VCL_INPUT_APPEVENT 0x0020 +#define VCL_INPUT_MOUSEANDKEYBOARD (VCL_INPUT_MOUSE | VCL_INPUT_KEYBOARD) +#define VCL_INPUT_ANY (VCL_INPUT_MOUSEANDKEYBOARD | VCL_INPUT_PAINT | VCL_INPUT_TIMER | VCL_INPUT_OTHER | VCL_INPUT_APPEVENT) #define DISPATCH_OPEN 0x0001 #define DISPATCH_PRINT 0x0002 diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx index 07f75f549dda..1cc0a404b19c 100644 --- a/vcl/inc/vcl/svapp.hxx +++ b/vcl/inc/vcl/svapp.hxx @@ -258,7 +258,7 @@ public: static sal_uInt16 GetModalModeCount(); static sal_uInt16 GetDispatchLevel(); - static sal_Bool AnyInput( sal_uInt16 nType = INPUT_ANY ); + static sal_Bool AnyInput( sal_uInt16 nType = VCL_INPUT_ANY ); static sal_uLong GetLastInputInterval(); static sal_Bool IsUICaptured(); diff --git a/vcl/ios/source/app/salinst.cxx b/vcl/ios/source/app/salinst.cxx index f7c96853bc0d..e91e34fa1e78 100644 --- a/vcl/ios/source/app/salinst.cxx +++ b/vcl/ios/source/app/salinst.cxx @@ -521,15 +521,15 @@ void IosSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents ) bool IosSalInstance::AnyInput( sal_uInt16 nType ) { - if( nType & INPUT_APPEVENT ) + if( nType & VCL_INPUT_APPEVENT ) { if( ! aAppEventList.empty() ) return true; - if( nType == INPUT_APPEVENT ) + if( nType == VCL_INPUT_APPEVENT ) return false; } - if( nType & INPUT_TIMER ) + if( nType & VCL_INPUT_TIMER ) { if( IosSalTimer::pRunningTimer ) { diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index c98ed9da290d..73659f5bad9b 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -131,13 +131,13 @@ Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData ) case Expose: case GraphicsExpose: case NoExpose: - nType = INPUT_PAINT; + nType = VCL_INPUT_PAINT; break; default: nType = 0; } - if ( (nType & pPre->nType) || ( ! nType && (pPre->nType & INPUT_OTHER) ) ) + if ( (nType & pPre->nType) || ( ! nType && (pPre->nType & VCL_INPUT_OTHER) ) ) pPre->bRet = sal_True; return False; @@ -150,10 +150,9 @@ bool X11SalInstance::AnyInput(sal_uInt16 nType) Display *pDisplay = pData->GetSalDisplay()->GetDisplay(); sal_Bool bRet = sal_False; - if( (nType & INPUT_TIMER) && mpXLib->CheckTimeout( false ) ) - { + if( (nType & VCL_INPUT_TIMER) && mpXLib->CheckTimeout( false ) ) bRet = sal_True; - } + else if (XPending(pDisplay) ) { PredicateReturn aInput; diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx index 16e702fcfd7d..9049419906cf 100644 --- a/vcl/unx/gtk/app/gtkinst.cxx +++ b/vcl/unx/gtk/app/gtkinst.cxx @@ -252,10 +252,10 @@ extern "C" { case Expose: case GraphicsExpose: case NoExpose: - nType = INPUT_PAINT; + nType = VCL_INPUT_PAINT; break; default: - nType = INPUT_OTHER; + nType = VCL_INPUT_OTHER; break; } ((GtkInstance *)data)->addEvent( nType ); @@ -284,10 +284,10 @@ extern "C" { nType = VCL_INPUT_KEYBOARD; break; case GDK_EXPOSE: - nType = INPUT_PAINT; + nType = VCL_INPUT_PAINT; break; default: - nType = INPUT_OTHER; + nType = VCL_INPUT_OTHER; break; } ((GtkInstance *)data)->subtractEvent( nType ); @@ -614,7 +614,7 @@ bool GtkInstance::IsTimerExpired() bool GtkInstance::AnyInput( sal_uInt16 nType ) { - if( (nType & INPUT_TIMER) && IsTimerExpired() ) + if( (nType & VCL_INPUT_TIMER) && IsTimerExpired() ) return true; else { diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index 10655ef77f77..caf0d273cba1 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -904,7 +904,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType ) { MSG aMsg; - if ( (nType & (INPUT_ANY)) == (INPUT_ANY) ) + if ( (nType & (VCL_INPUT_ANY)) == (VCL_INPUT_ANY) ) { // revert bugfix for #108919# which never reported timeouts when called from the timer handler // which made the application completely unresponsive during background formatting @@ -913,7 +913,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType ) } else { - if ( nType & INPUT_MOUSE ) + if ( nType & VCL_INPUT_MOUSE ) { // Test for mouse input if ( ImplPeekMessage( &aMsg, 0, WM_MOUSEFIRST, WM_MOUSELAST, @@ -936,7 +936,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType ) } } - if ( nType & INPUT_PAINT ) + if ( nType & VCL_INPUT_PAINT ) { // Test for paint input if ( ImplPeekMessage( &aMsg, 0, WM_PAINT, WM_PAINT, @@ -960,7 +960,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType ) return true; } - if ( nType & INPUT_TIMER ) + if ( nType & VCL_INPUT_TIMER ) { // Test for timer input if ( ImplPeekMessage( &aMsg, 0, WM_TIMER, WM_TIMER, @@ -969,7 +969,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType ) } - if ( nType & INPUT_OTHER ) + if ( nType & VCL_INPUT_OTHER ) { // Test for any input if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_NOREMOVE | PM_NOYIELD ) ) -- cgit v1.2.3