Commit graph

39990 commits

Author SHA1 Message Date
MacDue
42a7dc9fe2 MouseSettings: Show highlight toggle shortcut and new layout tweaks
This now shows the shortcut to enable mouse pointer highlighting below
the preview. The GML has also been updated to take advantage of the new
layout features rather than using fixed heights.
2022-07-24 15:10:01 +01:00
Karol Kosek
6148fd4ed5 Minesweeper: Remove decimal point from the time label
The timer was updating fast enough to be a little distracting for me.
2022-07-24 14:09:48 +01:00
David Smith
9ca580aac6 SystemMonitor: Keep selected row in ProcessMemoryMapWidget
The process memory view loses the selected row when it's redrawn. Call
update() instead of invalidate() to fix this.
2022-07-24 14:05:35 +01:00
networkException
2d681279d4 LibGUI: Properly handle range selections in ColumnsView
Previously we would always select the left most column when selecting a
range of rows.

This patch fixes this issue by always applying a selection to the column
in which the selection ends.
2022-07-24 13:40:31 +01:00
networkException
30d68d71b4 LibGUI: Move range selection calculations into separate function
AbstractView currently assumes a certain layout of rows and colums to
perform a range selection on.

This patch moves the implementation into a helper that can be overriden
by other views.
2022-07-24 13:40:31 +01:00
networkException
7540259b16 LibGUI: Alphabetize CMake sources 2022-07-24 13:40:31 +01:00
Liav A
60f7d61ad2 Kernel/SysFS: Fix parent directory hierarchy with symbolic links
We should actually start counting from the parent directory and not from
the symbolic link as it will represent a wrong count of hops from the
actual mountpoint.

The symlinks in /sys/dev/block and /sys/dev/char worked only by luck,
because I have set it to the wrong parent directory which is the
/sys/dev directory, so with the symlink it was 3 hops to /sys, together
with the root directory, therefore, everything seemed to work.

Now that the device symlinks in /sys/dev/block and /sys/dev/char are set
to the right parent directory and we start measure hops from root
directory with the parent directory of a symlink, everything seem to
work correctly now.
2022-07-24 13:38:24 +01:00
Karol Kosek
7e6e7d67a9 Base: Italicize some symbol glyphs in font Katica Italic 10
Previously they were the same as in the Katica Regular font.

0028, 0029, 002F, 003C, 003E, 005B-005E, 007B-007D
2022-07-24 13:33:31 +01:00
Karol Kosek
1096ef0f55 Base: Reduce spacing in some glyphs in font Katica Italic 10
0020, 0028-002F, 003A-003E, 0049, 004C
2022-07-24 13:33:31 +01:00
Karol Kosek
7f0cefcce8 Base: Make U+002E FULL STOP a 1x1 dot in font Katica Italic 10 2022-07-24 13:33:31 +01:00
Tim Schumacher
480ba792e3 du: Consolidate all "do not print" conditions
All of these conditions should make du just not report the file size
individually, but it should still count them into the grand total.

In the case of the `--threshold` option, this was actually implemented
incorrectly before, as it would report size 0 for files that did not
match the threshold.
2022-07-24 13:32:51 +01:00
Tim Schumacher
e4cdc7f685 du: Only use unmodified file sizes internally
This keeps us from repeatedly applying the block size calculation on
already processed values.
2022-07-24 13:32:51 +01:00
Tim Schumacher
9af302920a du: Use 64-bit integers when handling file sizes or related values
We may very well dip into files larger than 4G at some point, so 32-bit
values are not enough, and the 64-bit sized `off_t` doesn't fully make
sense either, as it features negative values.

Instead, switch to the explicit type of `u64` everywhere, which is the
same size on all platforms and is unsigned. The exception to this is
the threshold, which needs to be signed instead of unsigned.
2022-07-24 13:32:51 +01:00
Tim Schumacher
c1ab29b73c du: Fix a typo in the --exclude-from option 2022-07-24 13:32:51 +01:00
Tim Schumacher
6b270f7d01 du: Don't stop descending even if the maximum depth is reached
The `--max-depth` option only controls until which depth individual file
sizes are printed, it does not stop the utility from traversing that
branch further (as the file sizes would be wrong otherwise).

Restructure the program to track the current depth, and return early if
the current depth is higher than the maximum allowed depth, which skips
all parts of the logic that are concerned with user output.
2022-07-24 13:32:51 +01:00
MacDue
e11e9d3801 LibWeb: Paint a frame around (system) <progress> elements
This makes them look a bit more like a progress bar, especially
on white backgrounds (for the default theme) where you otherwise
cannot see the unfilled part of the bar.
2022-07-24 13:31:01 +01:00
MacDue
a75d5e1b77 Base: Remove some unnecessary styling from progressbar.html
The button color here now just creates issues on dark themes,
and the margin on the progress bar does nothing.
2022-07-24 13:31:01 +01:00
MacDue
9768cda634 LibWeb: Tidy up <progress> element default CSS
This is a very minor thing, but one being `background:` and
the other being `background-color:` bugged me (and not using
the named colors).
2022-07-24 13:31:01 +01:00
MacDue
226d3fba79 LibWeb: Use the palette "button text" on buttons in the default CSS
This fixes some legibility issues when using dark themes.
2022-07-24 13:31:01 +01:00
Liav A
977aa81310 Kernel+Userland: Add ioctl to set process ownership of DisplayConnector
Now that the infrastructure of the Graphics subsystem is quite stable,
it is time to try to fix a long-standing problem, which is the lack of
locking on display connector devices. Reading and writing from multiple
processes to a framebuffer controlled by the display connector is not a
huge problem - it could be solved with POSIX locking.

The real problem is some program that will try to do ioctl operations on
a display connector without the WindowServer being aware of that which
can lead to very bad situations, for example - assuming a framebuffer is
encoded at a known resolution and certain display timings, but another
process changed the ModeSetting of the display connector, leading to
inconsistency on the properties of the current ModeSetting.

To solve this, there's a new "master" ioctl to take "ownership" and
another one to release that ownership of a display connector device. To
ensure we will not hold a Process object forever just because it has an
ownership over a display connector, we hold it with a weak reference,
and if the process is gone, someone else can take an ownership.
2022-07-23 10:42:08 +01:00
Liav A
1968aba69b Kernel+Userland: Rename FB.h => Graphics.h
This header file represents the entire interface between the kernel and
userland, and as such, no longer should be called FB.h but something
that represents the whole graphics subsystem.
2022-07-23 10:42:08 +01:00
Liav A
b5e5b299c4 Userland: Remove stale remainders of old framebuffer devices 2022-07-23 10:42:08 +01:00
Liav A
b7d0b5d745 Kernel/Graphics: Remove out-of-context comment note 2022-07-23 10:42:08 +01:00
djwisdom
fae715a2c2 Ports: Update serenity-theming use latest commit f6d9306 2022-07-23 10:41:25 +01:00
MacDue
bc29161bac Base: Add some more progress bar demos
This adds an example of a progress bar with just `appearance none`,
and one with `appearance none` and some custom styling.
2022-07-23 01:45:49 +02:00
MacDue
980964d8f3 LibWeb: Add a default style for primitive progress bars
This style is the same as what is used in WebKit/Blink, it is a bit
ugly, but you're expected to override it. Adding more than a
background color here could cause some issues, as sites don't
expect to have to unset the styles.
2022-07-23 01:45:49 +02:00
MacDue
57c6792458 LibWeb: Support appearance: none for <progress> elements
This disables this system progress bar, and instead creates one
out of pseudo elements, that can be selected and styled with the
::-webkit-progress-bar/value selectors.
2022-07-23 01:45:49 +02:00
MacDue
d7d34d88e5 LibWeb: Implement appearance CSS property
This includes the "compat" values even though they are not strictly
necessary.
2022-07-23 01:45:49 +02:00
MacDue
b5febe538c LibWeb: Parse the -webkit-progress-bar/value pseudo elements
These will be needed for styling progress bars, sadly this can
only be done with these non-standard selectors. These are, hovever,
in use on real sites such as https://rpcs3.net/compatibility.
2022-07-23 01:45:49 +02:00
Tim Schumacher
218e6d2f5e Ports/SDL2: Rename LibAudio connection to ConnectionToServer 2022-07-23 00:21:13 +01:00
Timothy Flynn
ae2acc8cdf LibJS+LibUnicode: Generate a set of default DateTimeFormat patterns
This isn't called out in TR-35, but before ICU even looks at CLDR data,
it adds a hard-coded set of default patterns to each locale's calendar.
It has done this since 2006 when its DateTimeFormat feature was first
created. Several test262 tests depend on this, which under ECMA-402,
falls into "implementation defined" behavior. For compatibility, we
can do the same in LibUnicode.
2022-07-22 23:51:56 +01:00
Linus Groh
8150d71821 Everywhere: Prefix 'TYPEDEF_DISTINCT_ORDERED_ID' with 'AK_' 2022-07-22 23:09:43 +01:00
Linus Groh
5a106b6401 Everywhere: Prefix 'TYPEDEF_DISTINCT_NUMERIC_GENERAL' with 'AK_' 2022-07-22 23:09:43 +01:00
Kenneth Myhra
9a1c27a163 LibWeb: Implement BufferSource support for XHR::send() 2022-07-22 23:08:28 +01:00
Kenneth Myhra
e55bdd434a LibWeb: Add spec link for XMLHttpRequestBodyInit 2022-07-22 23:08:28 +01:00
Kenneth Myhra
5830ff5be9 LibWeb: Let XHR::extract_body() return ErrorOr
This is a minor refactor of XHR::extract_body() letting it return
ErrorOr<...> instead of just Fetch::Infrastructure::BodyWithType.

This also updates the one place extract_body() is used.
2022-07-22 23:08:28 +01:00
Kenneth Myhra
9fe12c1851 LibWeb: Let get_buffer_source_copy() return ErrorOr instead of Optional
This is a minor refactor of IDL::get_buffer_source_copy() letting it
return ErrorOr<ByteBuffer> instead of Optional<ByteBuffer>.

This also updates all places that use IDL::get_buffer_source_copy().
2022-07-22 23:08:28 +01:00
networkException
7a2bef7fe1 Help: Make history navigation work with man pages opened using help urls
This patch implements man pages opened using the help url protocol
properly getting added to the navigation history as well as enabling
the back and forward buttons in such cases.
2022-07-22 23:06:54 +01:00
networkException
7d177b7210 WorkspacePicker: Immediately update active workspace on click or scroll
This patch makes the picker applet react instantly to a click on a
workspace or scroll on the widget, instead of waiting for an event from
WindowServer and as such until the switching animation has ended. This
synchronises the switching with the overlay shown.

Note that WindowServer events will still get handled in case the
workspace were to be updated from somewhere else.
2022-07-22 21:54:20 +01:00
networkException
b3f8734e22 WorkspacePicker: Use full words for some variable names
This patch updates the spelling of "col" to be "column" and
"v{col,row}s" to be spelled out as "workspace_{row,column}s".
2022-07-22 21:54:20 +01:00
Karol Kosek
81bedb5066 Base: Add Latin-1 Supplement to font Roman Regular 10
00A4, 00A6, 00AA-00AD, 00AF, 00B1-00B3, 00B5, 00B8-00BE, 00C0-00FF
https://www.unicode.org/charts/PDF/U0080.pdf
2022-07-22 19:36:43 +01:00
kleines Filmröllchen
3123753e6b Piano: Increase AudioPlayerLoop resilience against scheduling weirdness
This is a temporary fix until we move AudioPlayerLoop to direct buffer
enqueuing.
2022-07-22 19:35:41 +01:00
kleines Filmröllchen
4941cffdd0 Piano+LibDSP: Move Track to LibDSP
This is a tangly commit and it fixes all the bugs that a plain move
would have caused (i.e. we need to touch other logic which had wrong
assumptions).
2022-07-22 19:35:41 +01:00
kleines Filmröllchen
125122a9ab LibAudio: Prevent racy eternal deadlock of the audio enqueue thread
The audio enqueuer thread goes to sleep when there is no more audio data
present, and through normal Core::EventLoop events it can be woken up.
However, that waking up only happens when the thread is not currently
running, so that the wake-up events don't queue up and cause weirdness.
The atomic variable responsible for keeping track of whether the thread
is active can lead to a racy deadlock however, where the audio enqueuer
thread will never wake up again despite there being audio data to
enqueue. Consider this scenario:

- Main thread calls into async_enqueue. It detects that according to the
  atomic variable, the other thread is still running, skipping the event
  queue wake.
- Enqueuer thread has just finished playing the last chunk of audio and
  detects that there is no audio left. It enters the if block with the
  dbgln "Reached end of provided audio data..."
- Main thread enqueues audio, making the user sample queue non-empty.
- Enqueuer thread does not check this condition again, instead setting
  the atomic variable to indicate that it is not running. It exits into
  an event loop sleep.
- Main thread exits async_enqueue. The calling audio enqueuing system
  (see e.g. Piano, but all of them function similarly) will wait until
  the enqueuer thread has played enough samples before async_enqueue is
  called again. However, since the enqueuer thread will never play any
  audio, this condition is never fulfilled and audio playback deadlocks

This commit fixes that by allowing the event loop to not enqueue an
event that already exists, therefore overloading the audio enqueuer
event loop by at maximum one message in weird situations. We entirely
get rid of the atomic variable and the race condition is prevented.
2022-07-22 19:35:41 +01:00
kleines Filmröllchen
763cda227f LibAudio: Don't auto-start the convenience enqueuer thread
This will conflict with apps that don't use this thread and it also
creates unnecessary overhead for non-enqueuing clients like AudioApplet.
Use the new Thread is_started info to start the thread only if necessary
(on first call to async_enqueue).
2022-07-22 19:35:41 +01:00
kleines Filmröllchen
91913fba59 LibThreading: Add is_started state information to Thread
Users can now determine whether a thread has been started or not. A
started thread might also have already terminated.

Implementation note: We *could* detect this with pthread APIs maybe, but
this is much simpler.
2022-07-22 19:35:41 +01:00
kleines Filmröllchen
500dc83f32 AK: Add FixedArray::fill_with
This is a memset-like utility method.
2022-07-22 19:35:41 +01:00
kleines Filmröllchen
5b1345a4ff AK: Remove FixedArray::must_create_but_fixme_should_propagate_errors
Nobody was using this anymore.
2022-07-22 19:35:41 +01:00
Tim Schumacher
8ab1245e4a Tests: Add a test for pthread_cancel 2022-07-22 10:07:15 -07:00
Tim Schumacher
c85f307e62 LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00