summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-15LibGfx: Make Painter::draw_rect() scale-awareNico Weber
Needed for the window server minimize animation. draw_rect() can't just call draw_line() because that isn't draw_op()-aware. The draw_op()-awareness in Painter looks a bit ad-hoc, but that's for another day.
2021-01-15Base: Add manpage entry for history eventsAnotherTest
2021-01-15Shell: Add formatter for history eventsAnotherTest
2021-01-15Shell: Add (basic) support for history event designatorsAnotherTest
Closes #4888
2021-01-15Tests: Move test-gfx-font to /usr/Tests/LibGfx/font and add new testsBrendan Coles
2021-01-15Kernel: Make Process::allocate_region*() return KResultOr<Region*>Andreas Kling
This allows region allocation to return specific errors and we don't have to assume every failure is an ENOMEM.
2021-01-15Kernel: Make sys$anon_create() require the "stdio" promise if pledgedAndreas Kling
2021-01-15WindowServer: Make HighDPI awareNico Weber
Almost all logic stays in "logical" (unscaled coordinates), which means the patch is small and things like DnD, window moving and resizing, menu handling, menuapplets, etc all work without changes. Screen knows about phyiscal coordinates and mouse handling internally is in physical coordinates (so that two 1 pixel movements in succession can translate to one 1 logical coordinate mouse movement -- only a single event is sent in this case, on the 2nd moved pixel). Compositor also knows about physical pixels for its backbuffers. This is a temporary state -- in a follow-up, I'll try to let Bitmaps know about their intrinsic scale, then Compositor won't have to know about pixels any longer. Most of Compositor's logic stays in view units, just blitting to and from back buffers and the cursor save buffer has to be done in pixels. The back buffer Painter gets a scale applied which transparently handles all drawing. (But since the backbuffer and cursor save buffer are also HighDPI, they currently need to be drawn using a hack temporary unscaled Painter object. This will also go away once Bitmaps know about their intrinsic scale.) With this, editing WindowServer.ini to say Width=800 Height=600 ScaleFactor=2 and booting brings up a fully-functional HighDPI UI. (Except for minimizing windows, which will crash the window server until #4932 is merged. And I didn't test the window switcher since the win-tab shortcut doesn't work on my system.) It's all pixel-scaled, but it looks pretty decent :^)
2021-01-15WindowServer: Delete dead set_screen parameterNico Weber
2021-01-15Demos+Games: Pledge "sendfd" in demos and gamesTheMorc
2021-01-15Kernel: Fix bogus negation of alloc_fd() error in sys$anon_create()Andreas Kling
Thanks to Idan for spotting this!
2021-01-15UserspaceEmulator: Support the anon_create, sendfd and recvfd syscallsAndreas Kling
2021-01-15Everywhere: Pledge "sendfd" in WindowServer client programsAndreas Kling
This is needed for the new way we transfer window backing stores.
2021-01-15LibGUI+WindowServer: Use anonymous files for window backing stores :^)Andreas Kling
This patch replaces the use of shbufs for GUI::Window backing stores with the new anonymous files mechanism. Backing bitmaps are now built on memory allocated with anon_create(). They are passed across the IPC socket as IPC::File. This means that WindowServer now pledges "recvfd" and graphical clients need to pledge "sendfd" to work. To support the cached bitmap swapping optimization on the WindowServer side, each backing store is assigned an incrementing serial number on the client side. (This allows us to re-use an already mapped file.)
2021-01-15LibGfx: Allow creating a Gfx::Bitmap backed by an anonymous fileAndreas Kling
Gfx::Bitmap::create_with_anon_fd() creates such a Bitmap, and also optionally takes ownership of the file, making sure to close() it on destruction.
2021-01-15Kernel: Add anonymous files, created with sys$anon_create()Andreas Kling
This patch adds a new AnonymousFile class which is a File backed by an AnonymousVMObject that can only be mmap'ed and nothing else, really. I'm hoping that this can become a replacement for shbufs. :^)
2021-01-15LibGUI: Add a WindowBackingStore classAndreas Kling
Instead of storing the back/front buffers of a GUI::Window as just Gfx::Bitmap, wrap them in a WindowBackingStore class. This will allow us to add more information alongside the bitmaps while keeping the back/front swapping logic simple.
2021-01-15Http[s]Protocol: Make the code start_download DRYLenny Maiorani
Problem: - `HttpProtocol::start_download` and `HttpsProtocol::start_download` implementations are the same except for a few types. Solution: - Follow the "Don't Repeat Yourself" mantra and de-duplicate the code using templates.
2021-01-15Badge: Access to underlying typeLenny Maiorani
Problem: - Access to the underlying type is not provided. This limits metaprogramming and usage in function templates. Solution: - Provide public access to the underlying type. - Add test to ensure the underlying type is accessible.
2021-01-15StringView: Implement `find_first_of` in terms of `AK::find`Lenny Maiorani
Problem: - The implementation of `find_first_of` is coupled to the implementation of `StringView`. Solution: - Decouple the implementation of `find_first_of` from the class by using a generic `find` algorithm.
2021-01-15AK: Implement generic any_of algorithmLenny Maiorani
Problem: - Raw loops are often written to validate that any values in a container meet a predicate, but raw loops are not as expressive as functions implementing well-named algorithms and are error-prone. Solution: - Implement a very generic form of `any_of`.
2021-01-15Tests: Test set uid/gid not dropped upon file renameBrendan Coles
2021-01-15LibGUI: Hold on to notification icon until NotificationServer respondsAndreas Kling
This broke when switching IPC messages to support move-only types. This pattern is not ideal, but the real fix for this will be using fd passing instead of shbufs. Fixes #4955.
2021-01-15Kernel: Make Locker remember whether the lock is heldTom
This allows temporarily unlocking a lock or re-locking it, and it will only unlock if it is still being held. Fixes #4352
2021-01-14SpaceAnalyzer: Fix TreeMapWidget layout issue for small rects.Mart G
For small rects there was a disagreement between two parts of the layout algorithm. There is a function that decides if there is enough space in a rectangle for a label. But this function was called on two slightly different rectangles.
2021-01-14Documentation: UsingQtCreator: Include Userland in includes pathsbcoles
2021-01-14Tests: Add LibC stdlib mktmp function tests for unique filenamesBrendan Coles
2021-01-14LibIPC: Add an expressive way to close an IPC::File after sending itAndreas Kling
If you don't need a file descriptor after sending it to someone over IPC, construct it with IPC::File(fd, IPC::File::CloseAfterSending) and LibIPC will take care of it for you. :^)
2021-01-14LibIPC: Close received IPC::File fd's by default unless takenAndreas Kling
When receiving a file descriptor over IPC, the receiver must now call take_fd() on the IPC::File to take over the descriptor. Otherwise, IPC::File will close the file on destruction.
2021-01-14IPCCompiler: Use move semantics in generated IPC message constructorsAndreas Kling
This allows us to use move-only types as IPC message parameters.
2021-01-14Website: Remove Wikipedia link from home pageAndreas Kling
The page about SerenityOS has been deleted from Wikipedia for lack of notoriety so let's not link to it.
2021-01-14DHCPClient: handle /proc/net/adapters invalid JSON gracefullyBrendan Coles
2021-01-14ProcFS: Ignore directories in refresh_data().Mart G
2021-01-14Meta: Update CLion CMakeLists for moved directoriesLuke
2021-01-14LibJS: Rename ErrorType::ProxyGetOwnDescriptor{Undef => Undefined}ReturnLinus Groh
This seems like an unnecessary and uncommon abbreviation.
2021-01-14LibJS: Rename ErrorType::ToObjectNullOr{Undef => Undefined}Linus Groh
This seems like an unnecessary and uncommon abbreviation.
2021-01-13LibCore: Include fcntl.h in more places that we use fcntl for LagomAndrew Kaster
Looks like it's more than just TcpServer where we do this :)
2021-01-13Meta: Add Andrew Kaster to the contributors list :^)Andreas Kling
2021-01-13LibCore: Include fcntl before using it for non-linux lagom buildsAndrew Kaster
SOCK_NONBLOCK is a linux-ism that serenity and linux support. For lagom builds, we use ioctl/fcntl to get a non-blocking socket the old fashioned way. Some file re-org unhid the fcntl.h dependency of TcpServer, so add the header explicitly.
2021-01-12LibLine: Use StringView::find() to find '::' in history entriesAnotherTest
Fixes an issue mentioned in #4926.
2021-01-12AK: Use StringView::find() in StringView::split_view()AnotherTest
This fixes #4926.
2021-01-12AK: Add String{View,}::find(StringView)AnotherTest
I personally mistook `find_first_of(StringView)` to be analogous to this so let's add a `find()` method that actually searches the string.
2021-01-12Kernel: Use current process EUID in doing profiling access controlAndreas Kling
2021-01-12LibC+Everywhere: Remove open_with_path_length() in favor of open()Andreas Kling
This API was a mostly gratuitous deviation from POSIX that gave up some portability in exchange for avoiding the occasional strlen(). I don't think that was actually achieving anything valuable, so let's just chill out and have the same open() API as everyone else. :^)
2021-01-12LibGfx: Make it possible to apply an (integer) scale to a PainterNico Weber
This adds a scale factor to Painter, which will be used for HighDPI support. It's also a step towards general affine transforms on Painters. All of Painter's public API takes logical coordinates, while some internals deal with physical coordinates now. If scale == 1, logical and physical coordinates are the same. For scale == 2, a 200x100 bitmap would be covered by a logical {0, 0, 100, 50} rect, while its physical size would be {0, 0, 200, 100}. Most of Painter's functions just assert that scale() == 1 is for now, but most functions called by WindowServer are updated to handle arbitrary (integer) scale. Also add a new Demo "LibGfxScaleDemo" that covers the converted functions and that can be used to iteratively add scaling support to more functions. To make Painter's interface deal with logical coordinates only, make translation() and clip_rect() non-public.
2021-01-12LibGfx: Make Painter::draw_pixel() with thickness = 1 work with RGBALinus Groh
The underlying fill_rect() works correctly, but the special case for thickness = 1 was not blending the new color with the target pixel's color, causing RGBA colors to be painted as their RGB counterpart.
2021-01-12Docs: Add design doc and implementation plan for highdpiNico Weber
I have a local branch that gets us past implementation stage 1 in this doc, and it seems like a useful enough checkpoint to upstream it and then iterate in tree.
2021-01-12Shell: Use lstat instead of access to check if glob target existsAnotherTest
Fixes #4905
2021-01-12LibCore: Don't create an RPC server when built for lagomAnotherTest
There's no reason to have this, and it will most likely fail anyway (since there's likely no /tmp/rpc).
2021-01-12Ports: Remove some no-longer-needed patches for git :^)Andreas Kling
We can mmap files with MAP_PRIVATE these days.