Commit graph

12317 commits

Author SHA1 Message Date
AnotherTest
ae9211037e LibLine: Make actual_rendered_string_metrics() static
This function didn't depend on the editor itself.
2020-08-18 16:58:17 +02:00
Muhammad Zahalqa
ff577e22a3 Kernel: ProcessorInfo.cpp remove unused headers 2020-08-18 13:41:08 +02:00
AnotherTest
bda1d7fd7b LibLine: Setup the keybindings after initialisation
This makes the keybindings that depend on `m_termios` (^W, ^U, etc) work.
2020-08-18 13:40:44 +02:00
Tom
a698a58d3c WindowServer: Fix flickering
Rather than blitting and rendering each window every time, only
render what actually changed. And while doing so, only render
the portions that are visible on the screen. This avoids flickering
because flipping framebuffers isn't always perfectly in sync with
the code, so it's possible that the flip happens slightly delayed
and we can briefly see the next iteration having partially completed.

Also, avoid touching the mouse cursor unless it is in an area that
needs updating. This reduces flickering unless it is over an area
that is updated often. And because we no longer render the entire
screen, we'll save the contents below the cursor so that we can
hide it before touching that area.

Fixes #2981
2020-08-18 12:12:27 +02:00
Tom
f8903acea2 LibGfx: Add convenience helpers for Rect 2020-08-18 12:12:27 +02:00
Tom
a43ba348e1 LibGfx: Add convenience method Point::constrained 2020-08-18 12:12:27 +02:00
Tom
790eacfbd1 LibGfx: Add a few convenience methods to DisjointRectSet 2020-08-18 12:12:27 +02:00
AnotherTest
5b9d563b4b LibLine: Allow the user to override (or add) keybinds in the config file 2020-08-18 12:07:32 +02:00
AnotherTest
32839d40e3 LibLine: Make (almost) all key actions configurable
This moves all internal functions to a new file, and defines the old
keybinds with register_key_input_callback().
2020-08-18 12:07:32 +02:00
AnotherTest
d0aab41628 LibLine: Read configuration from a config file 2020-08-18 12:07:32 +02:00
AnotherTest
afbeb8f977 LibCore: Add ConfigFile::get_for_lib() 2020-08-18 12:07:32 +02:00
Ben Wiederhake
1176865276 Meta: Explain how to build with ninja
Inspired by #3047, and my struggles to understand how cmake is supposed to work ^^

Thanks to @bgianfo, who made me realize that ninja can be used just like make.
No idea why I didn't notice that earlier.
2020-08-17 23:05:55 +02:00
Muhammad Zahalqa
8c7b5fb97b
Kernel: Remove unneeded header (#3196)
AK/HashTable.h is not needed from SpuriousInterruptHandler
2020-08-17 22:58:09 +02:00
Luke
c2a2552e46 LibWeb: Add more document tests, add comment, text and mixin tests
Also adds a TypeScript definition file for the test runner object.
2020-08-17 22:57:05 +02:00
Luke
8b807e65d7 LibWeb: Add Comment and DocumentFragment bindings, move querySelector...
...{All} to ParentNode. Exposes createDocumentFragment and
createComment on Document. Stubs out the document.body setter. 

Also adds ParentNode back :^).
2020-08-17 22:57:05 +02:00
Luke
7b755e6a58 LibWeb: Make HTMLPreElement's is_type match "listing" and "xmp"
I forgot to add these when I saw that listing and xmp are mapped to
HTMLPreElement.
2020-08-17 22:57:05 +02:00
Andreas Kling
d1e83b4f6e FileManager: Make DirectoryView vend indexes from view model
Instead of translating between the sorting proxy and the underlying
file system model at all the DirectoryView API boundaries, just hand
out indexes into the sorting proxy model.

The only thing those indexes are used for on the outside is to
retrieve a GUI::FileSystemModel::Node for an index, so add a nice
helper on DirectoryView that turns a ModelIndex into a Node&.
2020-08-17 22:49:52 +02:00
Andreas Kling
f0349323c4 LibGUI: Don't require passing model to FileSystemModel::Node APIs
The Node API was obnoxiously requiring you to pass the model into it
all the time, simply because nodes could not find their way back to
the containing model. This patch adds a back-reference to the model
and simplifies the API.
2020-08-17 22:02:21 +02:00
Andreas Kling
38d8426f32 FileManager: Move the "create new file" action into DirectoryView
This makes it available in both desktop and windowed modes. :^)
2020-08-17 21:34:14 +02:00
Andreas Kling
be48f58d41 FileManager: Move "create new directory" action into DirectoryView
This makes it available in both desktop and windowed mode. :^)
2020-08-17 21:34:14 +02:00
Andreas Kling
0ffd319bda FileManager: Partially bring back the desktop context menu 2020-08-17 21:34:14 +02:00
Andreas Kling
66cedfa13b FileManager: Don't pass DirectoryView subview to hooks that don't care 2020-08-17 21:34:14 +02:00
Andreas Kling
0083fe0118 FileManager: Use DirectoryView for both windowed and desktop mode
This patch begins the process of converting FileManager's desktop mode
to using the DirectoryView class.

This will allow us to share most of the code between the two different
runtime modes of FileManager.

We lose a bit of functionality in this patch, but we'll bring it back!
2020-08-17 21:34:14 +02:00
Nico Weber
e9b56b5b9c LibWeb: Add Node.textContent
This requires moving remove_all_children() from ParentNode to
Node, which makes ParentNode.cpp empty, so remove it.

It also co-opts the existing Node::text_content() method and
tweaks it slightly to fit the semantics of Node.textContent.
2020-08-17 21:23:11 +02:00
Nico Weber
c0c7b4a098 Clock MenuApplet: Use Core::DateTime to simplify the code 2020-08-17 21:23:11 +02:00
Nico Weber
a3908732ad LibJS: Add toLocaleString(), toLocaleDateString(), toLocaleTimeString() to Date
These just return a "readable" implementation of the date for now.
2020-08-17 21:23:11 +02:00
Nico Weber
8ebef785eb LibJS: Implement basic functionality of Array.from()
The optional 2nd and 3rd arguments are not yet implemented.

This assumes that `this` is the Array constructor and doesn't yet
implement the more general behavior in the ES6 spec that allows
transferring this method to other constructors.
2020-08-17 21:23:11 +02:00
Andreas Kling
a50a9d67ee WindowServer: Close the framebuffer fd in ~Screen() 2020-08-17 18:05:35 +02:00
Andreas Kling
9ddd540ca9 Kernel: Bump process thread count to a 32-bit value
We should support more than 65535 threads, after all. :^)
2020-08-17 18:05:35 +02:00
Andreas Kling
b6e18133ae LibWeb: Rename WebContentView => OutOfProcessWebView 2020-08-17 18:05:35 +02:00
Andreas Kling
56c3748dcc LibWeb: Rename PageView => InProcessWebView 2020-08-17 18:05:35 +02:00
Andreas Kling
ba856c7ebe LibDebug: Don't include <Libraries/...> 2020-08-17 18:05:35 +02:00
Andreas Kling
d62a59d7b8 LibCrypto: Don't include <Libraries/...> 2020-08-17 18:05:35 +02:00
Andreas Kling
c0462c65cf HackStudio: Move everything into the HackStudio namespace 2020-08-17 18:05:35 +02:00
Andreas Kling
ce48de9845 LibGUI: Add WidgetClassRegistration to Forward.h 2020-08-17 18:05:35 +02:00
Luke
c434a91c91 FileManager: Apply wallpaper on startup
I noticed that nothing actually applies the wallpaper on startup.
I wasn't sure where to put the responsibility, so I gave it to
the desktop mode file manager.

Also adds a save_config option to set_wallpaper so it doesn't
needlessly save the config.
2020-08-17 17:47:14 +02:00
AnotherTest
14a54a72fa Shell: Ensure that the cursor starts on a new line
And print an indicator when it doesn't, a la zsh.
2020-08-17 17:44:02 +02:00
AnotherTest
c96b9fdb0a LibLine: Add a getter for num_lines/num_cols 2020-08-17 17:44:02 +02:00
Tibor Nagy
fbc3b8e3c8 Solitaire: Rename "Restart game" menu item to "New game"
Also adding a shortcut (F2) to make it consistent with other games.
2020-08-17 17:39:56 +02:00
Tibor Nagy
e3d1ea34ff Games: Add missing separators to the application menus 2020-08-17 17:39:56 +02:00
Andreas Kling
a27d782dd6 FileManager: Don't close() twice when copying a file 2020-08-17 13:12:46 +02:00
Andreas Kling
0fecdb7904 disasm: Use make<X86::ELFSymbolProvider> instead of naked new 2020-08-17 13:12:46 +02:00
AnicJov
ac4897d613 LibWeb: Change cursor to IBeam when hovering text
This is what most browsers do, hopefully it isn't too silly :^)
2020-08-17 13:07:18 +02:00
Abu Sakib
1ec0f54de1 Chess: Add Help menuitem 2020-08-17 12:12:19 +02:00
Andreas Kling
d5d54da0ea Kernel: Don't use copy_from_user() for kernelspace read in perf events
Fixes #3182.
2020-08-17 09:57:18 +02:00
Nico Weber
22f701d657 malloc: Keep some stats and dump them at process exit if LIBC_DUMP_MALLOC_STATS is set
Very bare-bones and barely useful. Can go away once the perf_event-based
malloc tracking is further along.
2020-08-17 09:43:23 +02:00
Brian Gianforcaro
c44d2515b4 Kernel: Emit ProcFS pledge/veil properties as "N/A" for kernel processes
Pledges and Veil state don't really make sense for kernel mode
processes, as they can do what ever they want since they are in
kernel mode. Make this clear in the system monitor UI by marking
these entries as null.
2020-08-17 09:42:07 +02:00
Brian Gianforcaro
6fa76ed2e3 LibCore: Fix unitialized struct member in to_address_in, found by Coverity 2020-08-17 09:17:57 +02:00
Brian Gianforcaro
73ab030f88 FileManager: Fix descriptor leak in copy_file, found by Coverity 2020-08-17 09:17:57 +02:00
Brian Gianforcaro
e43d5d5eaa FileManger: Fix file descriptor leak in copy_file_or_directory, found by Coverity 2020-08-17 09:17:57 +02:00