diff options
| author | Tor Lillqvist <tml@collabora.com> | 2018-05-21 17:06:38 +0300 |
|---|---|---|
| committer | Tor Lillqvist <tml@collabora.com> | 2018-05-22 08:53:49 +0200 |
| commit | 059872b47ed957e847a3fe63bd35793ba93c4c32 (patch) | |
| tree | e8a01abc6da3f2ca4da8f0c64b24cd6a39356876 | |
| parent | 0f2157cb1513371829d7f8c415324cffed28c377 (diff) | |
tdf#77444: Call TriggerUserEventProcessing() in a few key places
Causes the updated aAppEventList to be handled right away, and not
only when the next ten-second timed fires.
Change-Id: Idbcc67f13c8ea69cc08b6c5f832d4461579d5dc6
Reviewed-on: https://gerrit.libreoffice.org/54643
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
| -rw-r--r-- | vcl/inc/osx/salinst.h | 3 | ||||
| -rw-r--r-- | vcl/osx/vclnsapp.mm | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h index 4bb86ea271db..6fcb76aec1a7 100644 --- a/vcl/inc/osx/salinst.h +++ b/vcl/inc/osx/salinst.h @@ -71,10 +71,11 @@ class AquaSalInstance : public SalInstance, public SalUserEventList bool RunInMainYield( bool bHandleAllCurrentEvents ); - virtual void TriggerUserEventProcessing() override; virtual void ProcessEvent( SalUserEvent aEvent ) override; public: + virtual void TriggerUserEventProcessing() override; + SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex OUString maDefaultPrinter; oslThreadIdentifier maMainThread; diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm index 825edac6be6c..4fc869f01919 100644 --- a/vcl/osx/vclnsapp.mm +++ b/vcl/osx/vclnsapp.mm @@ -248,6 +248,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP { const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, aFile); AquaSalInstance::aAppEventList.push_back( pAppEvent ); + AquaSalInstance *pInst = GetSalData()->mpInstance; + pInst->TriggerUserEventProcessing(); } return YES; } @@ -276,6 +278,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP // [app replyToOpenOrPrint: NSApplicationDelegateReplySuccess]; const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, aFileList); AquaSalInstance::aAppEventList.push_back( pAppEvent ); + AquaSalInstance *pInst = GetSalData()->mpInstance; + pInst->TriggerUserEventProcessing(); } } @@ -286,6 +290,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP aFile.push_back( GetOUString( pFile ) ); const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, aFile); AquaSalInstance::aAppEventList.push_back( pAppEvent ); + AquaSalInstance *pInst = GetSalData()->mpInstance; + pInst->TriggerUserEventProcessing(); return YES; } -(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(BOOL)bShowPrintPanels @@ -305,6 +311,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP } const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, aFileList); AquaSalInstance::aAppEventList.push_back( pAppEvent ); + AquaSalInstance *pInst = GetSalData()->mpInstance; + pInst->TriggerUserEventProcessing(); // we have no back channel here, we have to assume success // correct handling would be NSPrintingReplyLater and then send [app replyToOpenOrPrint] return NSPrintingSuccess; |
