Ladybird: Remove macOS workaround for WebContent GUI interaction

This reverts commit 4dcdc3bd25.

Now that WebContent is a QCoreApplication, this workaround is no longer
needed.
This commit is contained in:
Timothy Flynn 2023-07-31 11:50:50 -04:00 committed by Andreas Kling
parent aa7ca80d7c
commit 1d59a62944
Notes: sideshowbarker 2024-07-16 22:54:10 +09:00
4 changed files with 0 additions and 37 deletions

View file

@ -19,10 +19,6 @@ set(WEBCONTENT_SOURCES
main.cpp
)
if (APPLE)
list(APPEND WEBCONTENT_SOURCES MacOSSetup.mm)
endif()
qt_add_executable(WebContent ${WEBCONTENT_SOURCES})
target_include_directories(WebContent PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)

View file

@ -1,9 +0,0 @@
/*
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
void prohibit_interaction();

View file

@ -1,15 +0,0 @@
/*
* 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];
}

View file

@ -12,7 +12,6 @@
#include "../Utilities.h"
#include "../WebSocketClientManagerLadybird.h"
#include <AK/LexicalPath.h>
#include <AK/Platform.h>
#include <LibAudio/Loader.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/EventLoop.h>
@ -35,10 +34,6 @@
#include <WebContent/PageHost.h>
#include <WebContent/WebDriverConnection.h>
#if defined(AK_OS_MACOS)
# include "MacOSSetup.h"
#endif
static ErrorOr<void> load_content_filters();
static ErrorOr<void> load_autoplay_allowlist();
@ -48,10 +43,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
QCoreApplication app(arguments.argc, arguments.argv);
#if defined(AK_OS_MACOS)
prohibit_interaction();
#endif
Core::EventLoopManager::install(*new Ladybird::EventLoopManagerQt);
Core::EventLoop event_loop;