Commit graph

24310 commits

Author SHA1 Message Date
Andreas Kling
a5c9a31001 AK: Remove unused HashMap::remove_one_randomly() 2021-07-21 18:08:11 +02:00
Andreas Kling
c7d891765c LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
2021-07-21 18:02:15 +02:00
Andreas Kling
f0409081f5 LibC: Simplify assertion failure dbgln() a bit
There's no need to say USERSPACE(PID) since dbgln() will prefix lines
with that information anyway.
2021-07-21 17:45:24 +02:00
LuK1337
de09a92bf8 DesktopPicker: Add mouse wheel control
This lets us use scroll wheel up/down to move between columns and
shift + scroll wheel up/down to move between rows.
2021-07-21 18:04:30 +04:30
Jamie Mansfield
137d716495 LibLine: Correct spelling mistake in variable name
This corrects the spelling of 'matching' from 'macthing'.
2021-07-21 14:15:24 +02:00
Jamie Mansfield
3be472176d KeyboardSettings: Use typical OK-Cancel-Apply arrangement
This brings KeyboardSettings in line with the other settings
applications.
2021-07-21 12:34:27 +02:00
Ralf Donau
6629af8bed TextEditor: Tighten unveil
Only read access to the file_to_edit is required since
FileSystemAccessServer handles all other requests.
2021-07-21 10:47:22 +02:00
Andreas Kling
a34a9e8698 Base: More tweaks to the MouseSettings icons 2021-07-21 01:29:45 +02:00
Mathias Jakobsen
4384a236b0 MouseSettings: Use latest (unsaved) setting for testing double-click
Instead of using the doubleclick_event this uses the current double-
click speed setting to check whether or not the colors of the double-
click icon should be inverted. This allows us to use the current (and
unsaved) setting for comparison instead of having to apply the settings
first.
2021-07-21 01:24:24 +02:00
Tom
7e8a5d7323 LibIPC: Fix losing messages when connection is closed
This fixes not processing any messages read up until a connection
close is detected. We were returning from the function despite having
read some messages.
2021-07-21 01:13:45 +02:00
Andreas Kling
c09071e166 Base: Fix imperfection in mouse-cursor-speed icon (MouseSettings) 2021-07-21 00:20:05 +02:00
Tom
1b7e2eb970 DisplaySettings: Add ComboBox to allow selecting other screens
This enables changing monitor settings for each monitor individually.

In the event that changing a resolution causes screens to overlap we
now try to disperse the screens, although the algorithm currently
implemented may result in some rather unexpected layouts in certain
cases. We can still improve this logic, and eventually we're going to
have a widget where the screens can be arranged as desired.
2021-07-21 00:06:58 +02:00
Tom
dbb9f891fb WindowServer: Re-use existing Screen instances and improve fallbacks
If a screen layout cannot be applied, instead of failing to start
WindowServer try to fall back to an auto-generated screen layout with
the devices that are detected.

Also, be a bit smarter about changing the current screen layout.
Instead of closing all framebuffers and bringing them back up, keep
what we can and only change resolution on those that we need to change
them on. To make this work we also need to move away from using an
array of structures to hold compositor related per-screen data to
attaching it to the Screen itself, which makes re-using a screen much
simpler.
2021-07-21 00:06:58 +02:00
Tom
1ecb725357 LibGfx: Add an algorithm to disperse overlapping rectangles 2021-07-21 00:06:58 +02:00
Tom
5ae42736f8 Kernel: VirtIO framebuffer should clamp pending dirty rects if needed
If we change to a resolution smaller than what any pending dirty
rectangles contain, we need to clamp them to the new resolution.
2021-07-21 00:06:58 +02:00
Karol Kosek
8a6f69f2c8 SoundPlayer: Use full path for playlist items
This fixes an issue with not opening tracks if they have been placed
in a subfolder.
2021-07-21 00:04:54 +02:00
Karol Kosek
f572ddd280 IRCClient: Use target nick than the sender for received private chats
Sending a private message from other device by using a bouncer
caused the message to appear in the wrong channel, as if you had sent
it to yourself.
2021-07-21 00:03:13 +02:00
davidot
295192bf15 LibJS: Add tests for strict mode and strict mode propagation 2021-07-20 23:45:28 +02:00
davidot
f8a869f2fc LibJS: Fix that non-existent references are unresolvable in strict mode 2021-07-20 23:45:28 +02:00
davidot
a49b47bfe6 LibJS: Fix tests that expected wrong this values 2021-07-20 23:45:28 +02:00
Timothy Flynn
c6e9c6d6ab LibJS: Follow the spec more closely when determining the this value
Co-authored-by: davidot <david.tuin@gmail.com>
2021-07-20 23:45:28 +02:00
davidot
a394aa5830 LibJS: Fix that vm.in_strict_mode was propagated to eval and functions
For eval it depends on the CallerMode and for a created function it
depends on the function itself.
2021-07-20 23:45:28 +02:00
davidot
a6263150be LibJS: Disallow unqualified deletes in strict mode 2021-07-20 23:45:28 +02:00
davidot
697882a7ad LibJS: Disallow multiple __proto__ keys in object expression 2021-07-20 23:45:28 +02:00
davidot
93b57e6d8c LibJS: Disallow static methods named prototype in classes 2021-07-20 23:45:28 +02:00
davidot
40b8689f9b LibJS: Disallow duplicated variable declarations 2021-07-20 23:45:28 +02:00
davidot
5cc518f07a LibJS: Handle strict mode for functions more correctly
If a function is strict (has 'use strict' directive) it cannot have
bindings, cannot have duplicated parameter names and cannot have some
reserved keywords and identifiers as parameter names.
The logic partly applies depending on whether we are already in strict
mode or the function contains 'use strict';
2021-07-20 23:45:28 +02:00
davidot
4485df1405 LibJS: Be more strict about reserved and special identifiers 2021-07-20 23:45:28 +02:00
davidot
2a61b90fef LibJS: Be less strict about 'use strict'
It is allowed to have (bogus) directives e.g.
'does nothing'; 'same'; 'use strict';
Should still trigger strict mode.
2021-07-20 23:45:28 +02:00
Aziz Berkay Yesilyurt
41ebb12c9e ImageViewer: Do not resize the window if the image fits into the window 2021-07-20 23:40:26 +02:00
Aziz Berkay Yesilyurt
63e78ccd9f ImageViewer: Do not return early when the scale is not changed
When the image is rotated, the scale is still the same, but the window
needs to be still resized.
2021-07-20 23:40:26 +02:00
Aziz Berkay Yesilyurt
285d4fac38 ImageViewer: Use the same function to resize the window
ImageViewer used two different logic to resize the display window, which
leads to confusing behaviour for rotate function. Now all the resizing
behaviour goes through the existing resize_window function.
2021-07-20 23:40:26 +02:00
Andreas Kling
a19a40d6d3 MouseSettings: Further tweaks to margins and spacing :^) 2021-07-20 22:51:45 +02:00
Andreas Kling
81e6560009 MouseSettings: Give this application a GUI facelift :^)
Note that the double-click "icon" adapts to the double-click speed
and also reacts to double-clicks. :^)
2021-07-20 21:50:06 +02:00
Andreas Kling
3652ab8b2a LibGUI: Tweak GUI::GroupBox title text position 2021-07-20 21:50:06 +02:00
Linus Groh
feea534dae LibJS/Tests: Fix typo in Temporal.Instant.compare test description 2021-07-20 17:57:50 +01:00
Linus Groh
99662975ed LibJS: Partially revert e3fa32b
This was causing some syntactically wrong inputs to crash and
subsequently broke CI (test262 parser tests).
2021-07-20 17:53:48 +01:00
Andreas Kling
6453a9aa8e Base: Add 2x version of the about box "brand banner" 2021-07-20 18:05:05 +02:00
Andreas Kling
d7b7d8156f Base: Update the about box "brand banner"
Remove Buggie for a more professional look.
2021-07-20 18:05:05 +02:00
Andreas Kling
e7136399a1 LibX86: Add INT1 instruction (needed for disassembly) 2021-07-20 18:05:05 +02:00
Andreas Kling
d0fb511d75 FileManager: Set main window size before showing the window
This prevents sometimes seeing a smaller FileManager window on startup
before it resizes to the proper size.
2021-07-20 18:05:05 +02:00
Andreas Kling
f85b94e6d4 Kernel: Remove KBufferBuilder's can_expand restriction
KBufferBuilder is always allowed to expand if it wants to. This
restriction was added a long time ago when it was unsafe to allocate
VM while generating ProcFS contents.
2021-07-20 18:05:05 +02:00
Andreas Kling
fef835de7f Kernel: Remove KBufferBuilder API for reusing an existing buffer
This is not used anywhere anymore anyway.
2021-07-20 18:05:05 +02:00
Andreas Kling
a3063dfd33 Kernel: Simplify ProcFS generated buffer caching
Use a Mutex instead of a SpinLock to protect the per-FileDescription
generated data cache. This allows processes to go to sleep while
waiting their turn.

Also don't try to be clever by reusing existing cache buffers.
Just allocate KBuffers as needed (and make sure to surface failures.)
2021-07-20 18:05:05 +02:00
Andreas Kling
4d2473b7fa Kernel: Remove confused comment in KBufferBuilder::appendff()
KBufferBuilder exists for code that wants to build a KBuffer instead
of a String. KBuffer is backed by anonymous VM, while String is backed
by a kernel heap allocation.
2021-07-20 18:05:05 +02:00
Alexander
d528c9c2ee LibWeb: Don't print JavaScript syntax error hints
This uses the new flag in print_errors to not print hints. This
decreases the load time of JavaScript heavy webpages with many errors
significantly.
2021-07-20 16:20:59 +02:00
Alexander
e3fa32b2ad LibJS: Optimize source_location_hint and add flag in print_errors
This optimizes the algorithm used in source_location_hint and adds a
flag to not print hints in print_errors.
2021-07-20 16:20:59 +02:00
Peter Elliott
2ce8cca7b5 LibC: Implement flock(2) using fcntl's F_SETLK
While flock is not a posix interface, it exists on linux and all BSDs as
far as I am aware.
2021-07-20 17:44:30 +04:30
Peter Elliott
3fa2816642 Kernel+LibC: Implement fcntl(2) advisory locks
Advisory locks don't actually prevent other processes from writing to
the file, but they do prevent other processes looking to acquire and
advisory lock on the file.

This implementation currently only adds non-blocking locks, which are
all I need for now.
2021-07-20 17:44:30 +04:30
Gunnar Beutner
fbc56461da Profiler: Make profiler not truncate 64-bit addresses 2021-07-20 15:12:19 +02:00