summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-25WindowServer: Get taskbar height from TaskbarWindow directlythankyouverycool
Fixes incorrect hardcoded heights and a failure to get taskbar height when tiling on new workspaces.
2022-08-25LibGUI: Remember size and position of hidden Windowsthankyouverycool
And don't reset windowless rects on resize events. Fixes child windows reappearing at [0,0] and with the wrong dimensions after being hidden.
2022-08-25Apps+Demos+Dialogs: Remove unnecessary minimum window sizesthankyouverycool
The new layout system conveniently calculates these for us now. In the case of Mandelbrot where it needs to be overriden, make sure to disable obey min widget size first. In EmojiInputDialog's case, the window needs to be resized instead to center correctly.
2022-08-25LibGUI+WindowServer: Initialize minimum window size to zerothankyouverycool
And remove unnecessary workarounds to the old limit of {50, 50} and the cautious but arbitrary limit of {1, 1} for other WindowTypes. Null rects are already the default when calculating minimum window size and are the least restrictive but valid value. Also returns early during minimum size calculations for frameless windows, and verifies against negative minimum sizes and failure to disable widget min size before setting a minimum window size. Layout automatically overrides this setting each relayout otherwise.
2022-08-24LibCrypto: Implement a (mostly) proper to_double for UnsignedBigIntegerdavidot
SignedBigInteger can immediately use this by just negating the double if the sign bit is set. For simple cases (below 2^53) we can just convert via an u64, however above that we need to extract the top 53 bits and use those as the mantissa. This function currently does not behave exactly as the JS spec specifies however it is much less naive than the previous implementation.
2022-08-24LibCrypto: Make a VERIFY a static_assert since it only uses constantsdavidot
2022-08-24LibJS: Allow BigInts as destructuring property namesdavidot
These are simply treated as their numerical value which means that above 2^32 - 1 they are strings.
2022-08-24LibJS: Fix that leftshift for BigInts did not round downdavidot
For negative number this previously rounded towards zero instead of the intended always rounding down.
2022-08-24LibJS: Use the new BigInt compare_to_double algorithm :^)davidot
Although this is much more complicated it does not seem to impact performance that much even when looking only at values in which the previous casting to i32 was correct.
2022-08-24LibCrypto: Add a way to compare a SignedBigInteger with a doubledavidot
This supports any double value (except for NaNs) instead of having to cast the double to some smaller type which doesn't work for very large values.
2022-08-24Ports: Update gcc to version 12.2.0Brian Gianforcaro
2022-08-24Ports: Update binutils to version 2.39Brian Gianforcaro
2022-08-24Toolchain: Update GDB to version 12.1Brian Gianforcaro
2022-08-24Toolchain: Update binutils to version 2.39Brian Gianforcaro
2022-08-24Toolchain: Update gcc to version 12.2.0Brian Gianforcaro
2022-08-24Tests/Kernel: Make sure inaccessible area in TestEFault is actually thatAndreas Kling
We were relying on luck to make the mapping before our first mmap() be inaccessible. Let's make it explicit.
2022-08-24Kernel: Use RefPtr instead of LockRefPtr for PhysicalPageAndreas Kling
I believe this to be safe, as the main thing that LockRefPtr provides over RefPtr is safe copying from a shared LockRefPtr instance. I've inspected the uses of RefPtr<PhysicalPage> and it seems they're all guarded by external locking. Some of it is less obvious, but this is an area where we're making continuous headway.
2022-08-24Kernel: Make PhysicalPage::ref() use relaxed memory orderAndreas Kling
When incrementing a reference count, it should be sufficient to use relaxed ordering. Note that unref() still uses acquire-release.
2022-08-24Meta: Only include headings for populated groups/subgroups in emoji.txtRyan Liptak
The primary motivation for this is to make `generate-emoji-txt.sh` more useful for generating a compact list of new emoji being added (e.g. for use in commit messages / PRs) if it's run with an emoji image directory that contains only the new emojis.
2022-08-24Kernel: Remove unnecessary forward declaration of s_mm_lockAndreas Kling
2022-08-24Kernel: Don't take MM lock in ~PageDirectory()Andreas Kling
We don't need the MM lock to unregister a PageDirectory from the CR3 map. This is already protected by the CR3 map's own lock.
2022-08-24Kernel: Don't take MM lock in MemoryManager::dump_kernel_regions()Andreas Kling
We have to hold the region tree lock while dumping its regions anyway, and taking the MM lock here was unnecessary.
2022-08-24Kernel: Don't take MM lock in MemoryManager::enter_address_space()Andreas Kling
We're not accessing any of the MM members here. Also remove some redundant code to update CR3, since it calls activate_page_directory() which does exactly the same thing.
2022-08-24Kernel: Update comment about what the MM lock protectsAndreas Kling
2022-08-24Kernel: Don't wrap AddressSpace's RegionTree in SpinlockProtectedAndreas Kling
Now that AddressSpace itself is always SpinlockProtected, we don't need to also wrap the RegionTree. Whoever has the AddressSpace locked is free to poke around its tree.
2022-08-24Kernel: Make file-backed memory regions remember description permissionsAndreas Kling
This allows sys$mprotect() to honor the original readable & writable flags of the open file description as they were at the point we did the original sys$mmap(). IIUC, this is what Dr. POSIX wants us to do: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mprotect.html Also, remove the bogus and racy "W^X" checking we did against mappings based on their current inode metadata. If we want to do this, we can do it properly. For now, it was not only racy, but also did blocking I/O while holding a spinlock.
2022-08-24Kernel: Simplify the File memory-mapping APIAndreas Kling
Before this change, we had File::mmap() which did all the work of setting up a VMObject, and then creating a Region in the current process's address space. This patch simplifies the interface by removing the region part. Files now only have to return a suitable VMObject from vmobject_for_mmap(), and then sys$mmap() itself will take care of actually mapping it into the address space. This fixes an issue where we'd try to block on I/O (for inode metadata lookup) while holding the address space spinlock. It also reduces time spent holding the address space lock.
2022-08-24Kernel: Wrap process address spaces in SpinlockProtectedAndreas Kling
This forces anyone who wants to look into and/or manipulate an address space to lock it. And this replaces the previous, more flimsy, manual spinlock use. Note that pointers *into* the address space are not safe to use after you unlock the space. We've got many issues like this, and we'll have to track those down as wlel.
2022-08-24Kernel: Don't hog the MM lock while unmapping regionsAndreas Kling
We were holding the MM lock across all of the region unmapping code. This was previously necessary since the quickmaps used during unmapping required holding the MM lock. Now that it's no longer necessary, we can leave the MM lock alone here.
2022-08-24Kernel: Wrap RegionTree objects in SpinlockProtectedAndreas Kling
This makes locking them much more straightforward, and we can remove a bunch of confusing use of AddressSpace::m_lock. That lock will also be converted to use of SpinlockProtected in a subsequent patch.
2022-08-24WindowServer+DisplaySettings: Capitalize display mode dropdownJames Bellamy
Every other dropdown in settings is capitalized apart from this one. This commit fixes that.
2022-08-24Base: Add more emojiselectrikmilk
Adds 16 new emojis, improves 4 emojis, and respectfully adds U+1F595 :^)
2022-08-24Ports: Set correct path in `.la` files for libvorbisJelle Raaijmakers
These libtool archives incorrectly pointed to `/usr/local` causing other ports not to be able to find the libvorbis libraries. We cannot use `configure --prefix=...` since that will add up with our fixed `make DESTDIR=...` logic, causing the path to be duplicated. We can also not change that `DESTDIR` logic without influencing all other port builds. Finally, `configure --with-sysroot=...` doesn't work since not all other ports (such as SDL_mixer) have a recent enough libtool to understand the sysroot syntax. So let's `sed` this and be done with it :^)
2022-08-24PixelPaint: Add more iconselectrikmilk
This adds menu item icons for Add Mask, Flatten Image, Fit Image To View, and Generic 5x5 Convolution. This modifies the menu item icon for Swap Colors to make the action more obvious and improve accessibility.
2022-08-24Ports: Select right config tools for SDL_mixerJelle Raaijmakers
Previously, you would need `sdl-config` and `libmikmod-config` on your host machine to get SDL_mixer to build. With this patch, it always works :^)
2022-08-24Ports: Update stress-ng to version 0.14.03Brian Gianforcaro
The stress-ng project appears to have addressed all the issues we had been patching, and thus we no longer need almost all of these patches.
2022-08-24Documentation: Remove execute bit from image fileBrian Gianforcaro
2022-08-23LibJS: Use __builtin_isnan in static_assert instead of isnandavidot
For the fuzzer build isnan was not usable in a constexpr context however __builtin_isnan seems to always be. Also while we're here add my name to the copyright since I forgot after the Value rewrite.
2022-08-23PixelPaint: Add simple "Crop Image to Content" featureAndreas Kling
This command finds the smallest non-empty content bounding rect by looking for the outermost non-transparent pixels in the image, and then crops the image to that rect. It's implemented in a pretty naive way, but it's a start. :^)
2022-08-23PixelPaint: Make the default empty image transparent by defaultAndreas Kling
It was previously white by default, but let's change that. :^)
2022-08-23PixelPaint: Avoid division-by-zero in HistogramWidgetAndreas Kling
This is more of a hack fix than anything else, but let's stop PixelPaint from infinite-looping in HistogramWidget::paint_event().
2022-08-23Kernel: Remove big lock from sys$socketJames Bellamy
With the implementation of the credentials object the socket syscall no longer needs the big lock.
2022-08-23SQLStudio: Reset status bar and menu actions when closing a tabJose Flores
2022-08-23LibC: Add missing sys/cdefs.h includeEmily Trau
Some header files use __BEGIN_DECLS without including sys/cdefs.h. This causes issues for C code that compiles against these headers, which may occur with Ports.
2022-08-23LibWeb: Don't grow Wasm memory again after initialisationAli Mohammad Pur
The constructor grows the memory to the initial size, we don't need to do that again.
2022-08-23CI: Bust the macOS Lagom ccache and reduce its sizeTimothy Flynn
It currently takes upwards of 40 minutes to download the ccache on macOS and often errors-out near the end. Change the cache version to bust it so we can start anew. Reduce its max size to 2 GB (a clean build is ~0.9 GB, so this allows just over 2 clean builds to be cached).
2022-08-23Meta: Only run the emoji generator for Serenity buildsTimothy Flynn
It is not needed on Lagom, and was incidentally run twice.
2022-08-23Meta: Ensure the emoji generator depends on its own scriptTimothy Flynn
If the script changes, it better be re-run.
2022-08-23Userland: Consolidate most PATH resolving into a single implementationTim Schumacher
We previously had at least three different implementations for resolving executables in the PATH, all of which had slightly different characteristics. Merge those into a single implementation to keep the behaviour consistent, and maybe to make that implementation more configurable in the future.
2022-08-23Userland: Rely on a single authoritative source for the default `PATH`Tim Schumacher