summaryrefslogtreecommitdiff
path: root/Services/Clipboard
AgeCommit message (Collapse)Author
2021-01-12Services: Move to Userland/Services/Andreas Kling
2021-01-12AK: Simplify constructors and conversions from nullptr_tLenny Maiorani
Problem: - Many constructors are defined as `{}` rather than using the ` = default` compiler-provided constructor. - Some types provide an implicit conversion operator from `nullptr_t` instead of requiring the caller to default construct. This violates the C++ Core Guidelines suggestion to declare single-argument constructors explicit (https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit). Solution: - Change default constructors to use the compiler-provided default constructor. - Remove implicit conversion operators from `nullptr_t` and change usage to enforce type consistency without conversion.
2021-01-09Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.Everything: The modifications in this commit were automatically made using the following command: find . -name '*.cpp' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
2020-12-28Services: Fix typosBrendan Coles
2020-10-02AK: Add trivial structure validation to SharedBufferTom
If we're sharing buffers, we only want to share trivial structures as anything else could potentially share internal pointers, which most likely is going to cause problems due to different address spaces. Fix the GUI::SystemTheme structure, which was not trivial, which is now caught at compile time. Fixes #3650
2020-09-12LibIPC: Share most of the code between {Client,Server}ConnectionAndreas Kling
This patch introduces IPC::Connection which becomes the new base class of ClientConnection and ServerConnection. Most of the functionality has been hoisted up to the base class since almost all of it is useful on both sides. This gives us the ability to send synchronous messages in both directions, which is needed for the WebContent server process. Unlike other servers, WebContent does not mind blocking on a response from its client.
2020-09-05Clipboard: Add a key-value map alongside the clipboard storageAndreas Kling
A clipping now consists of three things: - The raw clip data - A MIME type - A key-value map (String, String) for anything you like
2020-07-06LibIPC+Services: Make ClientConnection take socket as NonnullRefPtrAndreas Kling
This avoids getting into the awkward situation where the socket is still part-owned by main() in multi-instance service. Also it just reads nicer.
2020-05-16LibIPC: Allow opt-in UTF-8 validation on message parametersAndreas Kling
You can now mark String message parameters with the [UTF8] attribute. This will cause the generated decoder to perform UTF-8 validation and reject the message if the given parameter is not a valid UTF-8 string. This frees up the receiving side from having to do this validation at a higher level.
2020-05-15Clipboard: Remove accidentally commited fileSergey Bugaev
2020-05-15Clipboard: Add missing copyright headerAndreas Kling
2020-05-14Clipboard: Move the system clipboard to a dedicated service process :^)Andreas Kling
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.