vcl/inc/osx/salframe.h | 3 -- vcl/osx/salnativewidgets.cxx | 46 ------------------------------------------- vcl/source/app/scheduler.cxx | 1 3 files changed, 50 deletions(-)
New commits: commit c76160c6e23f8a4e8d60068b7054591f238cbc9f Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Tue Nov 27 10:16:27 2018 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Tue Nov 27 10:35:01 2018 +0200 tdf#114839: Drop ancient AquaBlinker crack Most probably that was related to "pulsating" buttons that haven't been used since 10.9. Whether the code even worked (made buttons pulsate) on 10.9 anyway is unclear. Much of the code in this file uses various HITheme (Carbon?) API that as far as I know is long since deprecated and undocumented. It's weird that it still compiles, and that it doesn't get caught by the private API use checking when submitting to the the Mac App Store, in the LibreOffice Vanilla case. This change reduces the busy looping in Dialog::Execute() even when nothing happens (no user input, no mouse movement) when displaying a dialog. Change-Id: I9c62db608f637aa5d8493176feb2873f6426fd00 diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h index c1a55269b517..4d34b3375167 100644 --- a/vcl/inc/osx/salframe.h +++ b/vcl/inc/osx/salframe.h @@ -42,7 +42,6 @@ class AquaSalFrame; class AquaSalTimer; class AquaSalInstance; class AquaSalMenu; -class AquaBlinker; typedef struct SalFrame::SalPointerState SalPointerState; @@ -87,8 +86,6 @@ public: CGMutablePathRef mrClippingPath; // used for "shaping" std::vector< CGRect > maClippingRects; - std::list<AquaBlinker*> maBlinkers; - tools::Rectangle maInvalidRect; InputContextFlags mnICOptions; diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index d89fecf1681e..0026d68a0dbd 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -44,45 +44,6 @@ #endif -class AquaBlinker : public Timer -{ - AquaSalFrame* mpFrame; - tools::Rectangle maInvalidateRect; - - AquaBlinker( AquaSalFrame* pFrame, const tools::Rectangle& rRect ) - : Timer( "AquaBlinker" ) - , mpFrame( pFrame ) - , maInvalidateRect( rRect ) - { - mpFrame->maBlinkers.push_back( this ); - } - -public: - static void Blink( AquaSalFrame*, const tools::Rectangle&, int nTimeout = 80 ); - - virtual void Invoke() override - { - if( AquaSalFrame::isAlive( mpFrame ) && mpFrame->mbShown ) - { - mpFrame->maBlinkers.remove( this ); - mpFrame->SendPaintEvent( &maInvalidateRect ); - } - delete this; - } -}; - -void AquaBlinker::Blink( AquaSalFrame* pFrame, const tools::Rectangle& rRect, int nTimeout ) -{ - // prevent repeated paints from triggering themselves all the time - auto isRepeated = std::any_of(pFrame->maBlinkers.begin(), pFrame->maBlinkers.end(), - [&rRect](AquaBlinker* pBlinker) { return pBlinker->maInvalidateRect == rRect; }); - if( isRepeated ) - return; - AquaBlinker* pNew = new AquaBlinker( pFrame, rRect ); - pNew->SetTimeout( nTimeout ); - pNew->Start(); -} - // Helper returns an HIRect static HIRect ImplGetHIRectFromRectangle(tools::Rectangle aRect) @@ -514,13 +475,6 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, // avoid clipping when focused rc.origin.x += FOCUS_RING_WIDTH/2; rc.size.width -= FOCUS_RING_WIDTH; - - if( nState & ControlState::DEFAULT ) - { - AquaBlinker::Blink( mpFrame, buttonRect ); - // show correct animation phase - aPushInfo.animation.time.current = CFAbsoluteTimeGetCurrent(); - } } else aPushInfo.kind = kThemeBevelButton; diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index e647cab8de65..bdcb3fddafad 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -151,7 +151,6 @@ next_priority: // TODO: shutdown these timers before Scheduler de-init // TODO: remove Task from static object if ( pTask->GetDebugName() && ( false - || !strcmp( pTask->GetDebugName(), "AquaBlinker" ) || !strcmp( pTask->GetDebugName(), "desktop::Desktop m_firstRunTimer" ) || !strcmp( pTask->GetDebugName(), "DrawWorkStartupTimer" ) || !strcmp( pTask->GetDebugName(), "editeng::ImpEditEngine aOnlineSpellTimer" ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits