Commit graph

23606 commits

Author SHA1 Message Date
Jean-Baptiste Boric
934e53079f Utilities: Add ability to query specific user with id 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
538cc9d99a Utilities: Use Core::Account for id 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
16983dbe8e LibCore: Add ability to not read shadow data for Account
This stops spamming the kernel logs with unveil violations if the
program didn't unveil /etc/shadow.
2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
fdf638dde0 LibCore: Implement Account::self() 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
3db1681214 Utilities: Fix return value of expr 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
897a706075 Utilities: Add support for -d flag to tr 2021-07-09 20:15:40 +02:00
Jean-Baptiste Boric
eb65e41a9c Utilities: Implement pwd 2021-07-09 20:15:40 +02:00
LuK1337
f234c416af LibGUI: Handle TTF size selection changes in font picker properly
This patch addresses the following issues:
- size resetting to 1 when switching from bitmap font size 10 to TTF
- size resetting to 1 when incrementing spinbox from 8 to 9
- selection mode not being set on m_size_list_view selection change
2021-07-09 18:15:05 +02:00
Andreas Kling
e0a79efeae LibGfx: Make enclosing_int_rect(FloatRect) actually enclose the rect 2021-07-09 18:05:52 +02:00
Marcus Nilsson
c59c970363 PixelPaint: Don't deselect layers in LayerListWidget
There is really no reason to be able to deselect layers, so just ignore
when the user clicks outside of a layer gadget.
2021-07-09 18:04:01 +02:00
Marcus Nilsson
95710b0147 PixelPaint: Make sure that a layer is always selected
Make sure that a layer is selected after creating it, removing
one or creating a new image. Also make layer_properties_widget
update on tab change.
2021-07-09 18:04:01 +02:00
Marcus Nilsson
f3cdb9bfeb PixelPaint: Only scroll into view in LayerListWidget when needed
This makes sure that scroll_into_view is not called when not necessary,
or when m_layers is empty, which previously caused a crash upon
removing the last layer.
2021-07-09 18:04:01 +02:00
Daniel Bertalan
0e04f7cf1e LibVT: Always check intermediate bytes in CSI sequences
Previously, we only checked the intermediate bytes for those escape
sequences that performed different operations based on their
intermediate bytes. This lead to a crash when `CSI ?1001 r` was
incorrectly parsed as `CSI Pt ; Pb r` (note the missing question mark),
as seen in #8559.
2021-07-09 20:28:17 +04:30
Idan Horowitz
52aa777d49 LibJS: Add %TypedArray%.prototype.sort 2021-07-09 16:15:42 +01:00
Idan Horowitz
f98a98506f LibJS: Add %TypedArray%.prototype.subarray 2021-07-09 16:15:42 +01:00
Idan Horowitz
ff052a3241 LibJS: Add %TypedArray%.prototype.slice 2021-07-09 16:15:42 +01:00
Idan Horowitz
8127e30169 LibJS: Split detached buffer checking into validate_typed_array
Not all of the TypedArray prototype methods and accessors require
detached buffer validation (only the ones who call ValidateTypedArray)
so this behaviour was split from typed_array_from and the usage was
updated per the spec in each location.
2021-07-09 16:15:42 +01:00
Ali Mohammad Pur
67362b1f85 Ports: Make the CMake port use the LibUV port
Now that we've ported libuv, we can remove the libuv patches from cmake
and make it use the ported libuv.
2021-07-09 15:36:50 +02:00
Ali Mohammad Pur
fcd56f2172 Ports: Add libuv
We've had a half-arsed port of libuv inside the cmake port, but let's
just port it properly.
Note that this pins a specific commit (which is currently the latest
commit in their default branch).
2021-07-09 15:36:50 +02:00
Ali Mohammad Pur
727403746f LibC: Make makedev()/minor()/major() static
As we've opted to make these inline functions and not macros, let's at
least make sure that the users don't *observe* multiple definitions of
these functions.
2021-07-09 15:36:50 +02:00
Ali Mohammad Pur
e37f9fa7db LibPthread+Kernel: Add pthread_kill() and the thread_kill syscall 2021-07-09 15:36:50 +02:00
Linus Groh
ca71d99c66 LibJS: Implement Temporal.Instant.fromEpochNanoseconds() 2021-07-09 13:20:51 +01:00
Linus Groh
5872357b56 LibJS: Implement Temporal.Instant.fromEpochMicroseconds() 2021-07-09 13:20:51 +01:00
Linus Groh
66ff772254 LibJS: Implement Temporal.Instant.fromEpochMilliseconds() 2021-07-09 13:20:51 +01:00
Linus Groh
2401e45720 LibJS: Implement Temporal.Instant.fromEpochSeconds() 2021-07-09 13:20:51 +01:00
Linus Groh
9c9813c312 LibJS: Replace useless use of SignedBigInteger::create_from() with ctor
create_from() casts the value to a 64 bit integer and then creates two
words from it, which is not necessary if we only pass values to it that
fit into a single word (32 bit integer).
Also make them use UnsignedBigInteger as the previously missing SBI
divided_by() overload is now implemented.
2021-07-09 13:20:51 +01:00
Linus Groh
a216ea4c8d LibCrypto: Add missing implementation of SBI::divided_by(USBI) 2021-07-09 13:20:51 +01:00
Linus Groh
3014e529be LibJS: Tweak error message in the NumberToBigInt abstract operation
This is no longer specific to the BigInt() constructor, so it shouldn't
be mentioning an 'argument' that we might not have.
2021-07-09 13:20:51 +01:00
Linus Groh
9f2dd89446 LibJS/Tests: Add tests for Date.prototype.toTemporalInstant() 2021-07-09 13:20:51 +01:00
Andreas Kling
e5a1e535cc LibC: Re-run clang-format on malloc.cpp 2021-07-09 14:14:22 +02:00
Andreas Kling
19cb5ed97a LibC: Simplify locking in malloc
- Use a simple pthread_mutex_t instead of bringing in headers from
  LibThreading just to get a mutex.

- Use a normal mutex instead of a recursive one.

- Remove redundant locking in realloc().
2021-07-09 13:47:32 +02:00
Andreas Kling
b8a204c5b9 LibThreading: Rename Lock => Mutex 2021-07-09 11:15:50 +02:00
Andreas Kling
ce5d2b4f16 LibThreading: Remove unused "Lockable" class 2021-07-09 11:15:50 +02:00
Luke
1da06f9dfd LibJS: Add %TypedArray%.prototype.map 2021-07-09 10:15:45 +01:00
Luke
bc6f619344 LibJS: Add TypedArraySpeciesCreate and %TypedArray%.prototype.filter
I'm not too happy with how I get the default constructor in
typed_array_species_create, but it works for now.
2021-07-09 10:15:45 +01:00
Luke
53bc3f8e3b LibJS: Move typed_array_create to TypedArray.{h,cpp}
This is to make it accessible from TypedArrayPrototype, for use with
typed_array_species_create.
2021-07-09 10:15:45 +01:00
Aziz Berkay Yesilyurt
9b4729dd40 Userland: Add ability to capture rectangular region in shot
A click and drag selectable, transparent, fullscreen window is
displayed with the command line argument -r for screenshots.
2021-07-09 13:33:46 +04:30
Aziz Berkay Yesilyurt
dc833e49b0 WindowServer: Paint background when a fullscreen window is transparent
The windows in the background are ignored when the window is fullscreen.
However, we still would like to see the background if that window is
transparent.
2021-07-09 13:33:17 +04:30
Aziz Berkay Yesilyurt
6f594b36f5 LibGUI: Verify m_window_id is not-zero in set_maximized
Window::set_maximized requires non-zero window id to be a valid call,
i.e. calling Window::show beforehand. A verify statement before the
server call can help developers by hinting correct usage.
2021-07-09 13:32:30 +04:30
Ali Mohammad Pur
0459a111b2 Revert "Userland: Add ability to screenshot rectangular region in shot (#8515)"
This reverts commit 1c06d77262.
This was squashed by mistake, the rebased version will follow.
2021-07-09 13:27:56 +04:30
x-yl
1fe08759e3 Kernel: Support multiport for VirtIOConsole
This involves refactoring VirtIOConsole into VirtIOConsole and
VirtIOConsolePort. VirtIOConsole is the VirtIODevice, it owns multiple
VirtIOConsolePorts as well as two control queues. Each
VirtIOConsolePort is a CharacterDevice.
2021-07-09 13:19:21 +04:30
x-yl
1492bb2fd6 Kernel: Add support for reading from VirtIOConsole
This allows two-way communication with the host through a VirtIOConsole.
This is necessary for features like clipboard sharing.
2021-07-09 13:19:21 +04:30
Aziz Berkay Yesilyurt
1c06d77262
Userland: Add ability to screenshot rectangular region in shot (#8515)
* LibGUI: Verify m_window_id is not-zero in set_maximized

Window::set_maximized requires non-zero window id to be a valid call,
i.e. calling Window::show beforehand. A verify statement before the
server call can help developers by hinting correct usage.

* LibGUI: Paint background when the fullscreen window is transparent

The windows in the background are ignored when the window is fullscreen.
However, we still would like to see the background if that window is
transparent.

* Userland: Add ability to capture rectangular region in shot

A click and drag selectable, transparent, fullscreen window is
displayed with the command line argument -r for screenshots.
2021-07-09 13:11:24 +04:30
Aziz Berkay Yesilyurt
ec389adaa6 ImageViewer: Use real path for the image path
By using the real path for the image, ImageViewer can iterate over the
images in the same directory. Before, this was not possible when
ImageViewer opened from Terminal with a path argument.
2021-07-09 10:22:26 +02:00
Aziz Berkay Yesilyurt
f62f53f723 ImageViewer: Use LexicalPath to grab current_dir 2021-07-09 10:22:26 +02:00
Aziz Berkay Yesilyurt
dd476c35cb ImageViewer: Don't resize the window after the first image is displayed 2021-07-09 10:22:26 +02:00
Andreas Kling
36c8b1c58c Meta: Update CONTRIBUTING.md
- Rename "reviewers" to "maintainers" to disambiguate, since everyone
  is encouraged to participate in code review.

- Clarify that maintainership is by invitation only and unrelated to
  participation metrics.
2021-07-09 10:18:24 +02:00
Luke
c94b0e80e7 Kernel: Stop booting and print if PAE is not supported by the processor
We currently require PAE and not having it causes us to crash.
This turns that crash into an error message.
2021-07-09 01:29:52 +02:00
Linus Groh
6531485251 LibJS/Tests: Add tests for Temporal.Instant() constructor 2021-07-08 23:08:27 +01:00
Linus Groh
117323f2d9 LibJS: Implement Temporal.Instant.prototype.epochNanoseconds 2021-07-08 23:08:27 +01:00