LibWebView+UI: Move clipboard handling from the WebView to the App

Clipboard handling largely has nothing to do with the individual web
views. Rather, we interact with the system clipboard at the application
level. So let's move these implementations to the Application.
This commit is contained in:
Timothy Flynn 2025-09-18 08:16:36 -04:00 committed by Tim Flynn
parent 4f31e492e7
commit ca082d6d73
Notes: github-actions[bot] 2025-09-19 10:39:59 +00:00
15 changed files with 131 additions and 145 deletions

View file

@ -665,7 +665,7 @@ void Application::initialize_actions()
m_copy_selection_action = Action::create("Copy"sv, ActionID::CopySelection, [this]() {
if (auto view = active_web_view(); view.has_value())
view->insert_text_into_clipboard(view->selected_text());
insert_clipboard_entry({ view->selected_text(), "text/plain"_string });
});
m_paste_action = Action::create("Paste"sv, ActionID::Paste, [this]() {
if (auto view = active_web_view(); view.has_value())