summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-06Ports: Update Python to 3.9.5Linus Groh
Released on 2021-05-03. https://www.python.org/downloads/release/python-395/
2021-05-06LookupServer: Remove some unnecessary "rc" temporariesAndreas Kling
2021-05-06LookupServer: Check the return value after calling unveil()Andreas Kling
2021-05-06Base: Remove unnecessary UID separation of multi-process BrowserAndreas Kling
After looking closely at this, I realized that we've been running all the service processes under separate user accounts even though there's actually no need to. Since we already use pledge() and unveil() to limit the scope and access of these programs, separating them to another UID doesn't achieve anything meaningful. So let's bring them back to the "anon" user account and simplify things. Programs affected: - ImageDecoder - RequestServer - WebContent - WebSocket Longer term, I'd like for all of these to get spawned for the current desktop user somehow, possibly by some kind of session manager, or perhaps by the Browser program itself. But for now they remain under SystemServer's control.
2021-05-06TextEditor: Minor cleanups in the FileArgument classAndreas Kling
* Remove unnecessary #include statements * Move it into the TextEditor namespace * Mark the single-argument constructor explicit * Use move() to avoid some unnecessary copies
2021-05-06TextEditor: Rename "file_name" => "filename"Andreas Kling
2021-05-06WindowServer: Don't let clients start resize of non-resizable windowsAndreas Kling
This came up in #6886. If resizing has been disabled for a window, we shouldn't let clients bypass this via start_window_resize().
2021-05-06LibGUI: Don't show resize corner in non-resizable window's statusbarAndreas Kling
Fixes #6886.
2021-05-06LibC: Lazily initialize malloc chunksGunnar Beutner
By default malloc manages memory internally in larger blocks. When one of those blocks is added we initialize a free list by touching each of the new block's pages, thereby committing all that memory upfront. This changes malloc to build the free list on demand which as a bonus also distributes the latency hit for new blocks more evenly because the page faults for the zero pages now don't happen all at once.
2021-05-06LibGUI: Move widget registration to LibCoreTom
This also moves Widget::load_from_json into Core::Object as a virtual function in order to allow loading non-widget objects in GML (e.g. BoxLayout). Co-authored-by: Gunnar Beutner <gbeutner@serenityos.org>
2021-05-06DHCPClient: Handle invalid DHCP responses more gracefullyGunnar Beutner
2021-05-06Kernel: Truncate UDP packets on readGunnar Beutner
When reading UDP packets from userspace with recvmsg()/recv() we would hit a VERIFY() if the supplied buffer is smaller than the received UDP packet. Instead we should just return truncated data to the caller. This can be reproduced with: $ dd if=/dev/zero bs=1k count=1 | nc -u 192.168.3.190 68
2021-05-06LibGUI: Remember modified state on undo/redo actionsCarlos César Neves Enumo
2021-05-06LibGUI: Clear undo stack when opening a new documentCarlos César Neves Enumo
2021-05-05Meta: Add "Human language policy" to CONTRIBUTING.mdAndreas Kling
2021-05-05Kernel: Allow remapping Caps Lock to Control (#6883)Spencer Dixon
We use a global setting to determine if Caps Lock should be remapped to Control because we don't care how keyboard events come in, just that they should be massaged into different scan codes. The `proc` filesystem is able to manipulate this global variable using the `sysctl` utility like so: ``` # sysctl caps_lock_to_ctrl=1 ```
2021-05-05LibGUI: Add ScrollableContainerWidget :^)Andreas Kling
This widget provides a scrollable view onto another (child) widget. If the child is larger than the parent, scrollbars are provided for panning around the child.
2021-05-05LibMarkdown: Convert a bunch of StringBuilder::appendf() => appendff()Andreas Kling
2021-05-05LibSQL: Fix incorrect return typesGunnar Beutner
Right now RefPtr<T> is way more lenient than it should be. That might change in the future though.
2021-05-05Solitaire: Decrease new game animation delayTimothy Flynn
The current setting is an awful long time to wait for a game to start.
2021-05-05Solitaire: Add statusbar segment to display elapsed timeTimothy Flynn
The timer begins after the new-game animation ends, and stops when either the game-over animation begins or the new-game animation is started again.
2021-05-05LibGUI: Allow specifying GUI::Statusbar segment count in GMLTimothy Flynn
2021-05-05Solitaire: Add a GUI::Statusbar to the Solitaire windowTimothy Flynn
This will display the score (instead of updating the window title) and any hovered action text.
2021-05-05Solitaire: Only start timer when the timer event is neededTimothy Flynn
The timer is no longer used to trigger a paint event for all updates; it is only used to paint the new-game and game-over animations. So only run the timer during those events.
2021-05-05Solitaire: Refactor painting logic to accomodate to-be-added widgetsTimothy Flynn
A series of events led to this change: The goal is to add more widgets to the Solitaire GML, such as a GUI::Statusbar. To do so without this change, the window ends up with some black artifacts between the main Solitaire frame and the added elements, because the GML specifies the main widget to have fill_with_background_color=false. However, setting that property to true results in the background color of the widget interferring with the Solitaire frame trying to manually paint its background green. This results in flickering and some elements in the Solitaire frame being painted over by the main background color. To avoid all of that behavior, this sets fill_with_background_color=true and the Solitaire frame's background color to green in the GML. Further, the frame now only queues a paint update on the specific Gfx::Rect areas that need to be updated. This also means we no longer need to track if a stack of cards is dirty, because we only trigger a paint event for dirty stacks.
2021-05-05Solitaire: Don't invoke srand multiple timesTimothy Flynn
This doesn't need to be invoked each time the game wants something random.
2021-05-05Solitaire: Convert Solitaire GUI to a frameTimothy Flynn
Looks a bit nicer as a frame with inset edges.
2021-05-05Solitaire: Convert Solitaire window to be created from GMLTimothy Flynn
No functionial change here, but this more easily allows for adding GUI elements to the Solitaire window. This nests the SolitaireWidget as a child of the main window's widget so that the SolitaireWidget does not color the entire window green when it paints its background.
2021-05-05Solitaire: Place files in Solitaire namespace and rename main widgetTimothy Flynn
The purpose is to allow the Solitaire widget to be used in GML. The macro to register a widget requires a namespace, so this moves all files in the application to the Solitaire namespace. This also renames the SolitaireWidget class to Game - this is to avoid the redundancy / verbosity of typing "Solitaire::SolitaireWidget", and matches many other games in Serenity (Breakout, 2048, etc.).
2021-05-05Solitaire: Replace self-owned timer with Core::Object's timerTimothy Flynn
This is just a bit nicer than owning a separate timer in the Solitaire application because LibCore will prevent timer events from firing when e.g. the window is not visible. Therefore SolitaireWidget doesn't need need to check for such conditions.
2021-05-05Solitaire: Bump stacked cards down to reveal suitTimothy Flynn
Stacks of cards currently cover the suit completely and players must click-and-drag cards out of the way to see the suit beneath other cards. This bumps the stacks down a bit to let players peek the suit without having to take any action.
2021-05-05Meta: Enable linting of shell scripts under ToolchainBrian Gianforcaro
Now that everything under Toolchain is shellcheck clean, remove it from the exception list.
2021-05-05Toolchain: Fix expansion bugs and make BuildIt.sh shellcheck compliantBrian Gianforcaro
BuildIt.sh had a bunch of SC2086 errors, where we were not quoting variables in variable expansions. The logic being: Quoting variables prevents word splitting and glob expansion, and prevents the script from breaking when input contains spaces, line feeds, glob characters and such. Reference: https://github.com/koalaman/shellcheck/wiki/SC2086 As bcoles noticed in #6772, shellcheck actually found a real bug here, where the user's build directory included spaces. Close: #6772
2021-05-05Toolchain: Make BuildFuseExt2.sh shellcheck compliantBrian Gianforcaro
BuildFuseExt2.sh was saying it should be run under /bin/sh but it is using bash extensions like pushd/popd, ${BASH_SOURCE[0]}, etc. So just run it under bash to avoid any potential issues.
2021-05-05Toolchain: Make BuildPython.sh shellcheck compliantBrian Gianforcaro
Shellcheck is unable to source non-literal includes, so inform shellcheck to just ignore this include.
2021-05-05Base: Start LookupServer on bootSergey Bugaev
I can't say I like starting yet another thing on boot... but now that LookupServer provides mDNS (and optionaly DNS) services to other hosts, we have to start it on boot, not when the first local client connects.
2021-05-05LookupServer: Implement basic mDNS support :^)Sergey Bugaev
The implementation is extremely basic, and is far from fully conforming to the spec. Among other things, it does not really work in case there are multiple network adapters. Nevertheless, it works quite well for the simple case! You can now do this on your host machine: $ ping courage.local and same on your Serenity box: $ ping host-machine-name.local
2021-05-05LookupServer: Implement DNSName::operator==()Sergey Bugaev
2021-05-05Kernel: Implement IP multicast supportSergey Bugaev
An IP socket can now join a multicast group by using the IP_ADD_MEMBERSHIP sockopt, which will cause it to start receiving packets sent to the multicast address, even though this address does not belong to this host.
2021-05-05Meta: Add action to tweet each commit on pushIdan Horowitz
2021-05-05Kernel: Fix `write`s to `ProcFS` (#6879)Spencer Dixon
When using `sysctl` you can enable/disable values by writing to the ProcFS. Some drift must have occured where writing was failing due to a missing `set_mtime` call. Whenever one `write`'s a file the modified time (mtime) will be updated so we need to implement this interface in ProcFS.
2021-05-05Documentation: Update FAQ a bit and move it into Documentation/Andreas Kling
This was hiding on the serenityos.org website previously, where not many people found it. Let's put it in a more natural location, and also make sure to link to it from the README.
2021-05-05AK: Add a Variant<Ts...> implementationAli Mohammad Pur
Also adds an AK::Empty struct, because 'empty' variants are useful, but this implementation leaves that to the user (i.e. a variant cannot actually be empty, but it can contain an instance of Empty - i.e. a byte). Note that this is more of a constrained Any type, but they basically do the same things anyway :^)
2021-05-05AK: Export integer_sequence_generate_array()Ali Mohammad Pur
2021-05-05AK: Add min() and max() methods to Array<T, N>Ali Mohammad Pur
...That are only defined when min() and max() are defined on the elements.
2021-05-05Kernel: Modify TimeManagement::current_time(..) API so it can't fail. (#6869)Brian Gianforcaro
The fact that current_time can "fail" makes its use a bit awkward. All callers in the Kernel are trusted besides syscalls, so assert that they never get there, and make sure all current callers perform validation of the clock_id with TimeManagement::is_valid_clock_id(). I have fuzzed this change locally for a bit to make sure I didn't miss any obvious regression.
2021-05-05Kernel: Add Processor::is_bootstrap_processor() function, and use it. (#6871)Brian Gianforcaro
The variety of checks for Processor::id() == 0 could use some assistance in the readability department. This change adds a new function to represent this check, and replaces the comparison everywhere it's used.
2021-05-05Kernel: Remove shadowing member variable from FileDescriptionBlockerTom
FileDescriptionBlocker::m_should_block was shadowing the parent's FileBlocker::m_should_block variable, which would cause should_block() to return the wrong value. Found by @gunnarbeutner
2021-05-05LibWeb: Remove double comma in FrameLoader debug loggingIdan Horowitz
2021-05-05LibJS/Tests: Use hasOwnProperty() for duplicate test checkLinus Groh
The current way of doing this would also traverse the prototype chain, and therefore yield false positive results for keys like "toString".