summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwindow/llwindowmacosx-objc.h2
-rw-r--r--indra/newview/llappdelegate-objc.mm2
-rw-r--r--indra/newview/llappviewermacosx.cpp10
3 files changed, 14 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h
index b302a705da..ec9afb1844 100644
--- a/indra/llwindow/llwindowmacosx-objc.h
+++ b/indra/llwindow/llwindowmacosx-objc.h
@@ -78,6 +78,8 @@ void initMainLoop();
void cleanupViewer();
void handleUrl(const char* url);
void dispatchUrl(std::string url);
+void startWatchdog(std::string_view state);
+void stopWatchdog();
/* Defined in llwindowmacosx-objc.mm: */
int createNSApp(int argc, const char **argv);
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index 0b3d0355a2..d3aac5a43e 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -395,11 +395,13 @@ struct AttachmentInfo
- (void)sendEvent:(NSEvent *)event
{
+ startWatchdog("sendEvent"); // events are outside pumpMainLoop
[super sendEvent:event];
if ([event type] == NSEventTypeKeyUp && ([event modifierFlags] & NSEventModifierFlagCommand))
{
[[self keyWindow] sendEvent:event];
}
+ stopWatchdog(); // leaving scope
}
@end
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index b074c40c17..2bd9c8661a 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -135,6 +135,16 @@ void cleanupViewer()
gViewerAppPtr = NULL;
}
+void startWatchdog(std::string_view state)
+{
+ gViewerAppPtr->resumeMainloopTimeout(state);
+}
+
+void stopWatchdog()
+{
+ gViewerAppPtr->pauseMainloopTimeout();
+}
+
void clearDumpLogsDir()
{
if (!LLAppViewer::instance()->isSecondInstance())