Kaydet (Commit) 059872b4 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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/54643Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst 0f2157cb
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment