summaryrefslogtreecommitdiff
path: root/Ladybird/WebContent/MacOSSetup.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Ladybird/WebContent/MacOSSetup.mm')
-rw-r--r--Ladybird/WebContent/MacOSSetup.mm15
1 files changed, 15 insertions, 0 deletions
diff --git a/Ladybird/WebContent/MacOSSetup.mm b/Ladybird/WebContent/MacOSSetup.mm
new file mode 100644
index 0000000000..e323c58adf
--- /dev/null
+++ b/Ladybird/WebContent/MacOSSetup.mm
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include "MacOSSetup.h"
+#import <AppKit/NSApplication.h>
+
+void prohibit_interaction()
+{
+ // This prevents WebContent from being displayed in the macOS Dock and becoming the focused,
+ // interactable application upon launch.
+ [NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited];
+}