1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:55:08 +00:00

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.
This commit is contained in:
Andreas Kling 2020-05-14 22:51:15 +02:00
parent f4c60740bd
commit 244efe050a
25 changed files with 447 additions and 146 deletions

View file

@ -280,11 +280,6 @@ void WindowServerConnection::handle(const Messages::WindowClient::ScreenRectChan
Desktop::the().did_receive_screen_rect({}, message.rect());
}
void WindowServerConnection::handle(const Messages::WindowClient::ClipboardContentsChanged& message)
{
Clipboard::the().did_receive_clipboard_contents_changed({}, message.content_type());
}
void WindowServerConnection::handle(const Messages::WindowClient::AsyncSetWallpaperFinished&)
{
// This is handled manually by Desktop::set_wallpaper().