diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-14 22:51:15 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-14 22:53:58 +0200 |
commit | 244efe050ab6c8a47e6903cbb299158de8ab2711 (patch) | |
tree | e3ae3fc7d4dde8ee316b6db8627012c2470d42f4 /Libraries/LibGUI/Clipboard.h | |
parent | f4c60740bdbb107a8b6362ec5577333983c9af1b (diff) | |
download | serenity-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 'Libraries/LibGUI/Clipboard.h')
-rw-r--r-- | Libraries/LibGUI/Clipboard.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibGUI/Clipboard.h b/Libraries/LibGUI/Clipboard.h index 5504d91d88..e04e04c8f0 100644 --- a/Libraries/LibGUI/Clipboard.h +++ b/Libraries/LibGUI/Clipboard.h @@ -47,9 +47,9 @@ public: DataAndType data_and_type() const; - void did_receive_clipboard_contents_changed(Badge<WindowServerConnection>, const String& data_type); + Function<void(const String& data_type)> on_change; - Function<void(const String& data_type)> on_content_change; + static void initialize(Badge<Application>); private: Clipboard(); |