Commit graph

15404 commits

Author SHA1 Message Date
Andrew Kaster
350d4d3543 Meta: Enable RTTI for Userspace programs
RTTI is still disabled for the Kernel, and for the Dynamic Loader. This
allows for much less awkward navigation of class heirarchies in LibCore,
LibGUI, LibWeb, and LibJS (eventually). Measured RootFS size increase
was < 1%, and libgui.so binary size was ~3.3%. The small binary size
increase here seems worth it :^)
2021-01-01 14:45:09 +01:00
Brian Gianforcaro
43908db594 CMake: Add public cmake option to document BUILD_LAGOM
- Making this an option makes this option visible to users and tooling.
2021-01-01 14:37:04 +01:00
Brian Gianforcaro
40f671ac67 CMake: Add public cmake option to document ENABLE_ALL_THE_DEBUG_MACROS
- Making this an option makes this option visible to users and tooling.
- Rename `ALL_THE_DEBUG_MACROS` -> `ENABLE_ALL_THE_DEBUG_MACROS`.
2021-01-01 14:37:04 +01:00
Brian Gianforcaro
ab6ee9f7b2 CMake: Remove some trailing whitespace from a few CMakeLists.txt files 2021-01-01 14:37:04 +01:00
Brian Gianforcaro
6d67c4cafc CMake: Consolidate all options to the root of the project 2021-01-01 14:37:04 +01:00
Brendan Coles
74a65cffbd LibELF: validate_program_headers: Validate p_memsz and p_align 2021-01-01 14:34:25 +01:00
AnotherTest
887a62582d ProtocolServer: Use an empty Optional<IPC::File> to pass along "no fd"
Passing `-1` wouldn't work, as these are passed to `sendfd()'.
Fixes #4706.
2021-01-01 14:26:43 +01:00
Brendan Coles
f2973875e3 Base: Add Coffee theme 2021-01-01 13:10:54 +01:00
Andreas Kling
fc75421d50 Terminal: Tweak "Find" menu item -> "Find..."
The ellipsis (...) in a menu item traditionally means that the action
will require more input before executing. In this case, you need to
provide a search string. :^)
2021-01-01 02:19:45 +01:00
Andreas Kling
39efb3df18 LibGUI: Hide unnecessary scrollbars in MultiView
This removes pointless scrollbars in FilePicker which looks nice.
2021-01-01 02:12:39 +01:00
Andreas Kling
3eba01a02d LibGUI: Simplify setup code in GUI::MultiView
Use for_each_view_implementation() to avoid duplicating the setup code
for each subview.
2021-01-01 02:12:39 +01:00
Andreas Kling
71663a9431 FileManager: Hide unnecessary scrollbars in DirectoryView 2021-01-01 02:12:39 +01:00
Andrew Kaster
a3a9016701 DynamicLoader: Tell the linker to not add a PT_INTERP header
Use the GNU LD option --no-dynamic-linker. This allows uncommenting some
code in the Kernel that gets upset if your ELF interpreter has its own
interpreter.
2021-01-01 02:12:28 +01:00
Andreas Kling
4ea4cd5ee3 FileManager: Defer setting FileSystemModel root path in DirectoryView
Otherwise we always load the root directory on startup before switching
to whatever directory we actually wanted to open.
2021-01-01 01:55:30 +01:00
Andreas Kling
950a736127 Base: Add a desktop shortcut to the root directory 2021-01-01 01:48:20 +01:00
Andreas Kling
e82195ed1d Base: Add 32x32 variant of the hard-disk icon 2021-01-01 01:48:07 +01:00
Andreas Kling
78fbfd7795 Meta: Update project copyright dates (2018-2021) :^) 2021-01-01 01:14:16 +01:00
Andreas Kling
af7800d947 WindowServer: Flash modal window when clicking on window blocked by it
This makes window modality a bit more discoverable by indicating to the
user that the modal window must be closed before mouse interaction is
possible in the clicked window.
2021-01-01 01:10:53 +01:00
Andreas Kling
2e8db6560f LibGUI: Transfer focus when checking exclusive button programmatically
When calling set_checked(true) on an exclusive button, we will now
transfer focus to the newly checked button if one of its now-unchecked
siblings had focus before.

This makes windows that place initial focus somewhere in a group of
radio buttons look nicer when they show up, since focus will be on
whichever radio button was pre-checked, which may not be the first one
in the group.
2021-01-01 00:40:12 +01:00
Andreas Kling
5e19e72a6a LibGUI: Simplify RadioButton by using AbstractButton exclusive mode
Making an AbstractButton exclusive means that we enforce that only one
of the exclusive buttons within the same parent widget can be checked
at a time.

RadioButton was doing exactly the same thing, except in a custom way.
So just remove the custom code and make it exclusive. :^)
2021-01-01 00:33:44 +01:00
Andreas Kling
f0482a4cab Terminal: Make the settings window modal 2021-01-01 00:08:32 +01:00
Stephan Unverwerth
bb27b212de LibGfx: Introduce provisional font interface
Old font functionality has been moved into BitmapFont
and an abstract Font interface has been introduced to
faciliate further development of TTF font integration.
2020-12-31 23:40:27 +01:00
Andreas Kling
ac50bc79e4 Terminal: Move the settings window to GML :^) 2020-12-31 23:38:39 +01:00
Andreas Kling
f330dc3886 LibGUI: Add a bunch of missing widget registrations 2020-12-31 23:32:13 +01:00
Andreas Kling
87ad68c75b Meta: Use a raw string delimiter in text-to-cpp-string.sh
Otherwise we can't have the sequence ')"' in GML :^)
2020-12-31 23:31:22 +01:00
Tom
a4b3eb6b2d LibWeb: Clear circular download reference when download finished 2020-12-31 22:15:00 +01:00
Andrew Kaster
084c296362 Piano: Quit the audio thread by checking Core::EventLoop for exit
The infinite loop here doesn't really work at all for an application
process that expects to be able to exit. Check against
Core::EventLoop::current() to see if it's time to
exit, and return 0 from the thread function if so.

The thread will be joined in its destructor, which doesn't assert
anymore now that Thread is a jthread.
2020-12-31 21:59:20 +01:00
Andrew Kaster
06865c78c7 LibAudio: Make it so that an unused WavWriter is destructible
WavWriter::finalize didn't check that m_file was actually valid before
trying to seek and close it. The file is only set by set_file, so it's
not an invariant. Just add a null guard to finalize().
2020-12-31 21:59:20 +01:00
Andrew Kaster
644f5ec160 LibThread: Give Thread std::jthread semantics
Because pthread_create will always call pthread_exit internally before
exiting the thread function, we can remove the odd requirement that the
user's thread function must call Thread::quit internally.

Make Thread::join clear m_tid on success, and print to stderr on
failure. Call join from ~Thread(). Now if you write an infinite loop in
your thread in an application and don't have an exit condition, you will
block in the thread's destructor forever. Time for stop_token? :)
2020-12-31 21:59:20 +01:00
Andrew Kaster
2b3993b008 LibThread: Hide Thread's constructor, as it is a Core::Object
Just constructing one of these guys on the stack willy nilly will leak
the first reference to them. There might be other C_OBJECTs that have
public constructors, seems like a good place for some static analysis
checks :).

Force users to call the construct() method for it.
2020-12-31 21:59:20 +01:00
Dan MacDonald
b7fd5315e5
Ports: Hard-code SERENITY_ARCH=i686 until other architectures work (#4688) 2020-12-31 21:54:51 +01:00
Linus Groh
fb220d5678 Meta+Docs+CI: Require clang-format >= 11 2020-12-31 21:51:00 +01:00
Linus Groh
bbe787a0af Everywhere: Re-format with clang-format-11
Compared to version 10 this fixes a bunch of formatting issues, mostly
around structs/classes with attributes like [[gnu::packed]], and
incorrect insertion of spaces in parameter types ("T &"/"T &&").
I also removed a bunch of // clang-format off/on and FIXME comments that
are no longer relevant - on the other hand it tried to destroy a couple of
neatly formatted comments, so I had to add some as well.
2020-12-31 21:51:00 +01:00
AnotherTest
2568a93b5d ProtocolServer: Avoid blocking all downloads when client stops reading
Fixes #4668.
2020-12-31 16:57:09 +01:00
AnotherTest
83fed3fd5d LibWeb: Don't hold on to the Download instance after it's finished
Fixes* 4668
2020-12-31 16:57:09 +01:00
AnotherTest
a6b04cf8ef LibProtocol: Ensure download is finished before invoking on_finished 2020-12-31 16:57:09 +01:00
Linus Groh
a8ac8c6a8f AK: Add missing 'template' keywords in TypeList
This caused the AK build to be broken on OpenBSD (and possibly other
platforms / compiler versions).
Fixes #4692.
2020-12-31 16:16:07 +01:00
Andreas Kling
e6e4fe4f51 LibGUI: Add 1px of margin to EmojiPickerDialog
The left and top highlight edges were cut off by the dialog frame.
Add a small margin to make sure all buttons can be painted fully.
2020-12-31 14:39:23 +01:00
Andreas Kling
d441dec5d8 LibGUI: Make the emojis in the emoji input dialog fit in the window
GUI::Button has a default min-width of 32, so we have to override that
here in order to squeeze all the emojis into the window.

Fixes #4689.
2020-12-31 14:32:09 +01:00
Linus Groh
c0356fc183 WindowServer: Send WindowDeactivated event to windows blocked by modal
When a new modal window is created, we still want to forward the
WindowDeactivated event to its parent window, despite it being blocked
by the newly created modal (which causes WindowServer's Window::event()
to ignore all incoming events from WindowManager for that window).

This fixes the "terminal doesn't stop blinking when blocked by modal
window" bug.
2020-12-31 14:31:05 +01:00
Andreas Kling
e27d281bf1 UserspaceEmulator: Support sys$mremap()
This makes UE able to run dynamically linked executables once again.
2020-12-31 14:22:56 +01:00
Andreas Kling
fbf8751485 WidgetGallery: Add a GUI::OpacitySlider to the sliders tab :^) 2020-12-31 12:16:05 +01:00
Andreas Kling
47028c56c6 PixelPaint: Use GUI::OpacitySlider for layer opacity settings 2020-12-31 12:10:01 +01:00
Andreas Kling
0b55b0bdb8 Terminal: Use GUI::OpacitySlider in the settings window 2020-12-31 12:10:01 +01:00
Andreas Kling
ddaa13577e LibGUI: Add a new GUI::OpacitySlider widget :^)
This widgets offers a more visually intuitive way to adjust the opacity
of something.
2020-12-31 12:10:01 +01:00
Andreas Kling
acb87cd164 LibGfx: Remove unnecessary assertion in Painter::draw_pixel() 2020-12-31 12:10:01 +01:00
Tom
eabbe03b97 LibGUI: Constrain relative cursor delta to valid range 2020-12-31 10:54:02 +01:00
Tom
0c57e16ce4 LibGUI: Don't change the actual combobox value while hovering it
We don't want to trigger an actual selection change until either
confirming the new selection by keyboard or clicking on it.
Dismissing the dropdown should have no effect on the current
selection.

Fixes #4657
2020-12-31 10:54:02 +01:00
Tom
72440d90fe Kernel: Fix BlockCondition::unblock return value
BlockCondition::unblock should return true if it unblocked at
least one thread, not if iterating the blockers had been stopped.
This is a regression introduced by 49a76164c.

Fixes #4670
2020-12-31 10:52:58 +01:00
Tom
82c4812730 Kernel: Remove flawed SharedInodeVMObject assertion
This assertion cannot be safely/reliably made in the
~SharedInodeVMObject destructor. The problem is that
Inode::is_shared_vmobject holds a weak reference to the instance
that is being destroyed (ref count 0). Checking the pointer using
WeakPtr::unsafe_ptr will produce nullptr depending on timing in
this case, and WeakPtr::safe_ref will reliably produce a nullptr
as soon as the reference count drops to 0. The only case where
this assertion could succeed is when WeakPtr::unsafe_ptr returned
the pointer because it won the race against revoking it. And
because WeakPtr::safe_ref will always return a nullptr, we cannot
reliably assert this from the ~SharedInodeVMObject destructor.

Fixes #4621
2020-12-31 10:52:45 +01:00