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>
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user