summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-14 22:51:15 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-14 22:53:58 +0200
commit244efe050ab6c8a47e6903cbb299158de8ab2711 (patch)
treee3ae3fc7d4dde8ee316b6db8627012c2470d42f4 /Applications
parentf4c60740bdbb107a8b6362ec5577333983c9af1b (diff)
downloadserenity-244efe050ab6c8a47e6903cbb299158de8ab2711.zip
Clipboard: Move the system clipboard to a dedicated service process :^)
This commit moves the clipboard from WindowServer into a new Clipboard service program. Clipboard runs as the unprivileged "clipboard" user and with a much tighter pledge than WindowServer. To keep things working as before, all GUI::Application users now make a connection to Clipboard after making the connection to WindowServer. It could be interesting to connect to Clipboard on demand, but right now that would necessitate expanding every GUI app's pledge to include "unix" and also unveiling the clipboard portal, which I prefer not to.
Diffstat (limited to 'Applications')
-rw-r--r--Applications/FileManager/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp
index 3c9359fbde..31a2f4720d 100644
--- a/Applications/FileManager/main.cpp
+++ b/Applications/FileManager/main.cpp
@@ -607,7 +607,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
},
window);
- GUI::Clipboard::the().on_content_change = [&](const String& data_type) {
+ GUI::Clipboard::the().on_change = [&](const String& data_type) {
auto current_location = directory_view.path();
paste_action->set_enabled(data_type == "file-list" && access(current_location.characters(), W_OK) == 0);
};