Commit graph

19652 commits

Author SHA1 Message Date
Ali Mohammad Pur
415fd4d2ec AK: Make DistinctNumeric constexpr-capable 2021-05-04 21:32:15 +02:00
Andreas Kling
93f03c73d9 Base: Update recvfd() man page after addition of options argument 2021-05-04 21:02:22 +02:00
Andreas Kling
dbbc6096a9 Profiler: Move everything into the "Profiler" namespace 2021-05-04 20:59:32 +02:00
Idan Horowitz
d29e2dd2d7 Meta: Add workflow that deploys man page updates to man.serenityos.org 2021-05-04 20:58:25 +02:00
Andreas Kling
04c3cddb1e Snake: Spruce up the GUI a tiny bit
Give the game window a GUI::Frame appearance, and make sure the
menus have Alt shortcuts. :^)
2021-05-04 17:32:19 +02:00
Andreas Kling
d136fafde7 LibGUI: Make GUI::Widget ignore wheel events by default
This makes wheel events bubble up to parent widgets, which is useful
in case they care about wheel events even if their children don't.
2021-05-04 17:32:19 +02:00
Tom
ec27cbbb2a Kernel: Store whether a thread is the idle thread in Thread directly
This solves a problem where checking whether a thread is an idle
thread may require iterating all processors if it is not the idle
thread of the current processor.
2021-05-04 16:44:02 +02:00
Timothy Flynn
9a69b9112b LibWeb: Compute intrinsic height of absolute replaced elements
Previously, the method for computing the height of absolutely positioned
replaced elements only invoked the method for non-replaced elements.
That method is now implemented fully enough that it sometimes computed a
height of 0 for replaced elements. This implements section 10.6.5 rule 1
of the CSS spec to avoid that behavior.
2021-05-04 15:36:07 +01:00
Linus Groh
7d40a4a4e7 LibCore: Avoid unnecessary Vector copy in Account ctor 2021-05-04 15:16:28 +01:00
Linus Groh
d224610ecf LibCore: Don't include user GID in Account::extra_gids()
The user's GID is already available via gid(), and it's not "extra", so
don't include it in extra_gids() again. Also rename the internally used
function from get_gids() to get_extra_gids() to make its purpose more
clear.
2021-05-04 15:16:19 +01:00
Gunnar Beutner
3b759451c6 LibC: setspent() should not print to stderr 2021-05-04 13:45:49 +01:00
Gunnar Beutner
3cab91e8d7 LibCore: Let Account::from_* succeed if /etc/shadow is unreadable
This previously worked and was broken by 302f9798e.
2021-05-04 13:45:49 +01:00
Andreas Kling
19bef3877a Profiler: Don't link against LibCoreDump 2021-05-04 14:38:43 +02:00
Andreas Kling
f7de453716 LibGUI: Rename ScrollableWidget.cpp => AbstractScrollableWidget.cpp 2021-05-04 14:38:43 +02:00
Brian Gianforcaro
cc94495a29 Profiler: Print addresses in debug log in hex. 2021-05-04 10:57:55 +02:00
Brian Gianforcaro
35bb8ab4db Kernel: Return one kernel frame from procfs$tid_stack for normal users.
Previously we would return a 0xdeadc0de frame for every kernel frame
in the real kernel stack when an non super-user issued the request.
This isn't useful, and just produces visual clutter in tools which
attempt to symbolize stacks.
2021-05-04 10:57:39 +02:00
Brian Gianforcaro
869becc944 Kernel: Remove unused function ProcFS::add_sys_string 2021-05-04 10:57:39 +02:00
Brian Gianforcaro
9b5c137f46 Kernel: Remove unused header includes from ProcFS.cpp 2021-05-04 10:57:39 +02:00
Gunnar Beutner
a3baf06549 WindowServer: Ignore mouse clicks we're not handling
This ignores unhandled mouse clicks for the window buttons. Right now
right-clicking on the window buttons animates them as if some action
were to occur when the mouse button is released.
2021-05-04 08:40:00 +02:00
Linus Groh
aa70a56174 LibGUI: Fix off-by-one in Scrollbar::scrubber_rect()
Recent changes in the button painting code made this unnecessary. For
the case of value() == max(), the scrubber button would overlap the
increment button.

Fixes #6838.
2021-05-03 22:22:53 +01:00
Linus Groh
0c1d1d97d5 LibGUI: Remove unused Scrollbar::{de,in}crement_gutter_rect() 2021-05-03 22:21:21 +01:00
Andreas Kling
1ee31981da WindowServer: Close any open menus when starting window move/resize 2021-05-03 23:13:02 +02:00
J-VdS
396ff6401f
Meta: Add Discord badge to README.md (#6839)
Add a Discord badge to the top of the README.md file. It will show
the number of online users in the Discord server. If clicked it will
redirect you to the invite page.
2021-05-03 23:03:57 +02:00
Andreas Kling
1aa56f0129 WindowServer+LibGUI: Make much of window construction asynchronous
Most of the IPC that happens between clients and WindowServer when
creating and configuring windows can be asynchronous. This further
reduces the amount of ping-ponging played during application startup.
2021-05-03 21:56:19 +02:00
Andreas Kling
a8a899adbf WindowServer+LibGUI: Make much of menu construction asynchronous
Creating a menu/menubar needs to be synchronous because we need the
ID from the response, but adding stuff *to* menus (and adding menus
to menubars, and menubars to windows) can all be asynchronous.

This dramatically reduces the amount of IPC ping-pong played by
each GUI application during startup.

I measured how long it takes TextEditor to enter the main event loop
and it's over 10% faster here. (Down from ~86ms to ~74ms)
2021-05-03 21:56:13 +02:00
Gunnar Beutner
8a6db55e79 Userland: Add try_* IPC handlers
This enables calling auto-generated IPC methods in a way that doesn't
crash the client if the peer disconnects.
2021-05-03 21:14:40 +02:00
Gunnar Beutner
34cf5cf07f IPCCompiler: Don't generate handlers for response messages
For some reason we had IPC handler methods for the return types. This
removes those handlers.
2021-05-03 21:14:40 +02:00
Gunnar Beutner
9e22e9ce88 Userland: Use snake case names in .ipc files
This updates all .ipc files to have snake case names for IPC methods.
2021-05-03 21:14:40 +02:00
Gunnar Beutner
eb21aa65d1 Userland: Make IPC results with one return value available directly
This changes client methods so that they return the IPC response's
return value directly - instead of the response struct - for IPC
methods which only have a single return value.
2021-05-03 21:14:40 +02:00
Gunnar Beutner
5bb79ea0a7 Userland: Update IPC calls to use proxies
This updates all existing code to use the auto-generated client
methods instead of post_message/send_sync.
2021-05-03 21:14:40 +02:00
Gunnar Beutner
78803ce384 Userland: Split IPC endpoints into proxies and stubs
This enables support for automatically generating client methods.
With this added the user gets code completion support for all
IPC methods which are available on a connection object.
2021-05-03 21:14:06 +02:00
Gunnar Beutner
065040872f Userland: Change IPC funcs to use plain arguments instead of a struct
Instead of having a single overloaded handle method each method gets
its own unique method name now.
2021-05-03 21:14:06 +02:00
Andreas Kling
d47f15ab8b LibGUI: Rename ScrollableWidget => AbstractScrollableWidget 2021-05-03 21:03:13 +02:00
Andreas Kling
62125796c3 Minesweeper: Tweak main UI layout a little bit
Move the clock/flag icons closer to their respective text labels.
2021-05-03 18:07:35 +02:00
Andreas Kling
6e4e3cefb2 Minesweeper: Add a tasteful separator line between menubar and UI 2021-05-03 17:08:28 +02:00
Andreas Kling
381dcca2f6 Revert "LibGfx: Add directional floating-point scaling to Painter"
This reverts commit ff76a5b8d2.
2021-05-03 16:37:05 +02:00
Andreas Kling
f43adb816e Revert "LibGfx: Re-add missing bounds-checks to Painter::draw_rect"
This reverts commit 4cf5514672.
2021-05-03 16:36:57 +02:00
Brian Gianforcaro
4bf9b399f7 Kernel: Remove unused header includes from various files.
Found while browsing code with CLion.
2021-05-03 16:03:17 +02:00
Brian Gianforcaro
65138171f9 Kernel: Mark AsyncBlockDeviceRequest + AnonymousVMObject as final
Mark final to aid in de-virtualization since they are not currently
derived from.
2021-05-03 16:03:17 +02:00
Brian Gianforcaro
f1c4a42840 Documentation: Add a note about excluding the Build directory in CLion
This was discussed a while back on discord, but no one got around to
writing it down yet.
2021-05-03 15:20:26 +02:00
Brian Gianforcaro
0726d39cb1 LibC: Fix invalid 1-byte read I introduced in dirent.
When attempting to fix the dirent code I also changed
this to use strlcpy instead of the custom string copy
loop that was there before. Looking over strlcpy it
looked like it should work when using a non null terminated
string, I obviously misinterpreted the implementation
as it will read till it finds a null terminator.

Manually null terminate the string to address this.

Gunnar found this after he fixed UserspaceEmulator.
I reproduced it locally using his branch, and also
found the memory leak I had in the unit test for the
scandir that I added, so lets fix that as well.

Reported-by: Gunnar Beutner <gbeutner@serenityos.org>
2021-05-03 09:47:05 +02:00
spigwitmer
3a5f9b2f7e LibDebug: add DW_LNS_set_basic_block support
This adds support for the basic_block register to the Dwarf line
number state machine.
2021-05-03 09:01:14 +02:00
Paul Berg
bd68ca362b TextEditor: Clear the selection before deleting it
This patches fixes a crash of the Userland/TextEditor where it would
crash when deleting a range spanning two lines. This was because the
TextEditor would delete the range and modify the cursor position
before clearing the selection. This would trigger a status bar update
with the invalid selection.
2021-05-03 08:45:32 +02:00
Carlos César Neves Enumo
97d0028098 LibGUI: Debounce TextDocument undo stack
This replaces the repeating 2-sec timer with a debounced single-shot
timer on user input.
2021-05-03 08:43:10 +02:00
Gunnar Beutner
824bfa9600 DynamicLoader: Fix compiler warning
math.cpp: In function 'int64_t __moddi3(int64_t, int64_t)':
math.cpp:168:13: error: 'r' may be used uninitialized
[-Werror=maybe-uninitialized]
  168 |     return ((int64_t)r ^ s) - s; // negate if s == -1
      |             ^~~~~~~~~~
2021-05-03 08:42:39 +02:00
Gunnar Beutner
56ee4a1af2 AK: Silence -Wmaybe-uninitialized warning
Adding -fno-semantic-interposition to the GCC command
line caused this new warning.

I don't see how output.data() could be uninitialized here. Also,
commenting out the ensure_capacity() call for the Vector
also gets rid of this warning.
2021-05-03 08:42:39 +02:00
Gunnar Beutner
d685db6eb6 Toolchain: Enable building all code with -fPIC
Ordinarily this would force the compiler to not inline certain
symbols and call them via the PLT instead. To counteract this
I've also added -fno-semantic-interposition which disables
ELF symbol interposition. Our dynamic loader doesn't support
this anyway and we might even consider not implementing this
at all.

Even though this is a toolchain change this doesn't require
rebuilding the toolchain unless you're planning to build
for the x86_64 arch.
2021-05-03 08:42:39 +02:00
Gunnar Beutner
a050b43290 LibELF: Implement x86_64 relocation support
There are definitely some relocations missing and this is untested
for now.
2021-05-03 08:42:39 +02:00
Gunnar Beutner
6990ab41c8 Kernel: Fix some 64-bit portability issues 2021-05-03 08:42:39 +02:00
Gunnar Beutner
b613817bca Userland: Fix 64-bit portability issues 2021-05-03 08:42:39 +02:00