Commit Graph

20411 Commits

Author SHA1 Message Date
Andreas Kling
7e799529b9 WindowServer+LibGUI: Make menubar allocation asynchronous
Same as with menu allocation, move menubar ID management to the client
side, removing more IPC stalls during application startup.
2021-05-17 13:33:41 +02:00
Andreas Kling
baab0a5bef WindowServer+LibGUI: Make menu allocation asynchronous
This was only synchronous since WindowServer managed the ID allocation.
Doing this on the client side instead allows us to make create_menu()
an asynchronous IPC call, removing a bunch of IPC stalls during
application startup.
2021-05-17 13:33:41 +02:00
Gunnar Beutner
52054eb922 UE: Make sure we return the right values for get{peer,sock}name
These two functions didn't previously return error codes correctly and
would crash when an invalid address buffer was specified.
2021-05-17 13:32:19 +02:00
Gunnar Beutner
07341c3594 LibCore: Close accepted sockets on exec() and make them non-blocking
Previously accept() would copy the listener socket's cloexec and
non-blocking flag. With that fixed however TCPServer and LocalServer
now leak file descriptors into child processes and are blocking.
2021-05-17 13:32:19 +02:00
Gunnar Beutner
89956cb0d6 Kernel+Userspace: Implement the accept4() system call
Unlike accept() the new accept4() system call lets the caller specify
flags for the newly accepted socket file descriptor, such as
SOCK_CLOEXEC and SOCK_NONBLOCK.
2021-05-17 13:32:19 +02:00
Gunnar Beutner
529f605ac8 UE: Make sure the buffers for get{sock,peer}name() are large enough
Previously struct sockaddr was used which isn't guaranteed to be
large enough to hold the socket address get{sock,peer}name() returns.

Also, the addrlen argument was initialized incorrectly and should
instead use the address length specified by the caller.
2021-05-17 13:32:19 +02:00
Gunnar Beutner
fbfd0ed5ab LibCore: Open files with O_CLOEXEC by default
This changes Core::File::open() to specify O_CLOEXEC by default
so that we don't leak file descriptors into child processes. The
new behavior can be overriden by specifying OpenMode::KeepOnExec.
2021-05-17 13:32:19 +02:00
Andreas Kling
67ed580532 Chess: Make the main widget a GUI::Frame for a nicer look :^) 2021-05-17 12:02:38 +02:00
Andreas Kling
2083d1a3d6 WindowServer: Ignore window base size in aspect ratio enforcement
This makes windows with an aspect ratio behave more naturally if they
also have a base size (e.g from the main widget being a GUI::Frame.)
2021-05-17 12:01:17 +02:00
Daniel Bertalan
f0375e3efe Kernel+LibC: Support more termios settings in TTY
This commit adds support for the various ECHO* lflags and fixes some
POSIX conformance issues around newline handling. Also included are
error messages when setting not implemented settings.
2021-05-17 11:00:48 +02:00
Ali Mohammad Pur
b1b0db946e LibJS: Default-initialize the current_node pointer member in CallFrame
Some parts of the code depend on this being nullptr without actually
initializing it, leading to odd random crashes.
e.g. `VM::call_internal`.
2021-05-17 09:41:26 +02:00
Lenny Maiorani
adbf555e64 LibCrypto: Fix incorrectly constexpr variable
Problem:
- Clang ToT reports an error because `digest_size` cannot be evaluated
  at compile-time.

Solution:
- Change from using the member function to the `static` shadow of the
  NTTP.
2021-05-17 08:16:46 +02:00
Liav A
e6f333ae00 Kernel: Print failed attempt to shutdown the machine
Because we don't parse ACPI AML yet, If we are not able to shut down
the machine with "hacky" emulation methods - halt and print this state
to the users so they know they can shutdown the machine by themselves.
2021-05-17 00:30:40 +01:00
Liav A
02b73cb93d Kernel/Graphics: Be more consistent about arguments passing
This fixes a bug that was reported on this discord server by
@ElectrodeYT - due to the confusion of passing arguments in different
orders, we messed up and triggered a page fault due to faulty sizes.
2021-05-17 00:30:40 +01:00
Grant Yap
ca9101e5f0 Piano: Use the return key emoji in the key labels
The new way labels are stored unfortunately makes it *slightly* less
convenient to update the lists of white key and black key labels.
2021-05-17 00:16:49 +01:00
Grant Yap
186102dcc6 Emoji: Add a return key symbol 2021-05-17 00:16:49 +01:00
Ömer Kurttekin
cab821cd22
Ports: Update the packages.db directory in README
"packages.db" used to be directly in the "Build" directory but it has
been moved to "Build/i686/Root/usr/Ports/" in 6877a5b.
2021-05-16 22:52:51 +01:00
Siddharth Kapoor
dbd9d13857
Meta: Run 'du' with '--apparent-size', except on macOS
Fixes #7172.
2021-05-16 22:50:46 +01:00
Erik Biederstadt
2eb9dca782
GLTeapot: Add support for loading OBJ files containing extra information
If the OBJ loader encounters a file with vertex normals or texture
coordinates then it will no longer crash.
2021-05-16 22:48:23 +01:00
Luke
1258d06f74 LibWeb: Fix "adopt" => "adopt_ref" change in adoptNode exceptions
This was accidentally changed in
b91c49364d
2021-05-16 22:08:49 +01:00
Linus Groh
d7c0370c57 GameOfLife: Don't randomize cells on board resize
Loosing all game state for a simple resize of the board is quite
disappointing, so let's not do that. :^)
2021-05-16 23:00:21 +02:00
Linus Groh
7dea3d41cb GameOfLife: Use a frame as the board widget container
This adds a bit of depth and looks very nice :^)
2021-05-16 23:00:21 +02:00
Linus Groh
9151364e22 GameOfLife: Add vertical separator between interval and action buttons 2021-05-16 23:00:21 +02:00
Linus Groh
d859bde337 GameOfLife: Move "ms" interval label to GML
There's no reason not to!
2021-05-16 23:00:21 +02:00
Linus Groh
e7dc0bdba3 GameOfLife: Auto-size toolbar labels 2021-05-16 23:00:21 +02:00
Linus Groh
9a3f62adc7 GameOfLife: Remove some unused includes 2021-05-16 23:00:21 +02:00
Linus Groh
030360c787 GameOfLife: Add some margin to the toolbar layout
Ideally the inner widgets / vertical separators would have some as well,
but I'm not sure how right now. One step at a time. :^)
2021-05-16 23:00:21 +02:00
Linus Groh
f89eb0e4ce GameOfLife: Switch from single indexed vector to rows+columns
This is not only easier to comprehend code-wise and avoids some function
overloads, but also makes resizing the board while preserving game state
*a lot* easier. We now no longer have to allocate a new board on every
resize, we just grow/shrink the individual row vectors.
Also fixes a crash when clicking the board widget outside of the drawn
board area.
2021-05-16 23:00:21 +02:00
Linus Groh
00bfcef5be Base: Make 16x16 Play/Pause/Stop icons a bit smaller
These all looked out of place both when used on a regular button (e.g.
in the SoundPlayer application) and a toolbar action button (e.g. in the
GameOfLife application). This makes them a bit smaller (hand-drawn, not
scaled down).
2021-05-16 23:00:21 +02:00
Liav A
7995e115b8 Kernel/Graphics: Round size value when mapping real framebuffer 2021-05-16 21:59:10 +01:00
Liav A
7f3080c8f2 Kernel/Graphics: Assign console to be from VGACompatibleAdapter always
If we create a VGACompatibleAdapter object with a preset framebuffer,
Always assign the console so we can use it.

This is useful for modesetting done by a Multiboot loader, like GRUB.
2021-05-16 21:59:10 +01:00
Liav A
58d7eb36ad Kernel/Graphics: Fix a method to be more accurate about its name 2021-05-16 21:59:10 +01:00
Andrew Kaster
cfdd231a4d Documentation: Add Sanitizer section to RunningTests
Also, add link to RunningTests BuildInstructions, and clean up stale
commands in RunningTests to align to current build strategies.
2021-05-16 21:58:14 +01:00
Andrew Kaster
ac1d87b990 CI: Compile and run Lagom tests with ASAN and UBSAN
Make sure halt_on_error=1 is enabled so that UBSAN failures will crash
the test program and cause a failure.
2021-05-16 21:58:14 +01:00
Andrew Kaster
73adbb319c AK: Don't read past the end in BitmapView::count_in_range()
The current code is factored such that reads to the entirety of the last
byte should be dropped. This was relying on the fact that last would be
one past the end in that case. Instead of actually reading that byte
when it's completely out of bounds of the bitmask, just skip reads that
would be invalid. Add more tests to make sure that the behavior is
correct for byte aligned reads of byte aligned bitmaps.
2021-05-16 21:58:14 +01:00
Andrew Kaster
b9d65da5c8 LibCore: Use Vector instead of VLA in ArgsParser::parse()
If there happens to be zero positional arguments, this constructs a
0-length VLA, which is UB caught by UBSAN.
2021-05-16 21:58:14 +01:00
Andrew Kaster
11214bc94d AK: Don't call memcpy with null argument in ByteBuffer::copy()
This was happening in TestBase64.test_decode, while copying an empty
string.
2021-05-16 21:58:14 +01:00
Andreas Kling
00fa5dc53e Taskbar: Make shutdown dialog non-resizable and tweak button spacing 2021-05-16 21:23:31 +02:00
Andreas Kling
551e13b407 LibGUI: Put some more space between check boxes and their label text 2021-05-16 21:15:34 +02:00
Andreas Kling
3c831b146c LibGUI: Put some more space between radio buttons and their label text 2021-05-16 21:14:04 +02:00
Andreas Kling
f34a3b9521 Taskbar: Give the shutdown dialog a UI facelift :^) 2021-05-16 20:57:45 +02:00
Andreas Kling
ce47bbc965 Base: Tweak app-text-editor 32x32 icon (pencil color) 2021-05-16 20:27:17 +02:00
Liav A
8cbf3d88ff Kernel: Move ConsoleDevice initialization just after kmalloc init
This will ensure we will get all the kernel log on the second tty.
2021-05-16 19:58:33 +02:00
Liav A
dbccfc3281 Kernel: Print all logbuffer from ConsoleDevice to debug Virtual Console 2021-05-16 19:58:33 +02:00
Liav A
2e565f1b8a Meta: Update grub configuration to adopt the new textual boot mode 2021-05-16 19:58:33 +02:00
Liav A
69a54e5f64 Documentation: Update bare metal troubleshooting guide 2021-05-16 19:58:33 +02:00
Liav A
ab52108982 Kernel: Allow the user to specify the virtual console when booting 2021-05-16 19:58:33 +02:00
Liav A
99eab4667a Kernel: Print scheduler state to the display console 2021-05-16 19:58:33 +02:00
Liav A
20743e8aed Kernel/Graphics + SystemServer: Support text mode properly
As we removed the support of VBE modesetting that was done by GRUB early
on boot, we need to determine if we can modeset the resolution with our
drivers, and if not, we should enable text mode and ensure that
SystemServer knows about it too.

Also, SystemServer should first check if there's a framebuffer device
node, which is an indication that text mode was not even if it was
requested. Then, if it doesn't find it, it should check what boot_mode
argument the user specified (in case it's self-test). This way if we
try to use bochs-display device (which is not VGA compatible) and
request a text mode, it will not honor the request and will continue
with graphical mode.

Also try to print critical messages with mininum memory allocations
possible.

In LibVT, We make the implementation flexible for kernel-specific
methods that are implemented in ConsoleImpl class.
2021-05-16 19:58:33 +02:00
Liav A
dac129e10b Kernel: Expand the kernel memory slot from 16 MiB to 32 MiB
Like in 8cd5477e54, we need to expand the
kernel slot again to be able to boot again.
2021-05-16 19:58:33 +02:00