Commit graph

20136 commits

Author SHA1 Message Date
Linus Groh
5eb062d8d3 Documentation: Update sync-local.sh keyboard layout example 2021-05-09 15:31:52 +01:00
Stephan Unverwerth
e4db18e644 Demos: GLTeapot: Enable depth testing in demo 2021-05-09 15:58:35 +02:00
Stephan Unverwerth
e8f66f821c LibGL: Add depth tests and writes to SoftwareRasterizer
Tests against and writes to the depth buffer when GL_DEPTH_TEST is
enabled via glEnable(). Currently fragment z is always compared against
existing depth with GL_LESS.
2021-05-09 15:58:35 +02:00
Stephan Unverwerth
608f81e6c2 LibGL: Add depth buffer class 2021-05-09 15:58:35 +02:00
Stephan Unverwerth
a8fc4be47a LibGL: Add supporting code for depth buffer
This adds glClearDepth() and new caps for enabling and disabling
the depth buffer with glEnable() and glDisable()
2021-05-09 15:58:35 +02:00
Ömer Kurttekin
d922c2f5f3
Userland: Preserve keyboard mapping preference on reboot (#6955) 2021-05-09 15:56:03 +02:00
Erlend
4c43fc0515
AnalogClock: New analog clock application (#6760) 2021-05-09 15:51:36 +02:00
Andreas Kling
c53e937014 WindowServer: Constrain popup menu Y position within screen rect
This fixes an issue where large popup menus would open upwards despite
there not being enough space for that.
2021-05-09 15:47:21 +02:00
Andreas Kling
4c6e3d0c59 WindowServer: Fix a handful of clang-tidy warnings in the menu code
Some avoidable signed/unsigned mismatch, String move construction,
and functions that can be static constexpr.
2021-05-09 15:47:21 +02:00
faxe1008
cbb06d7014
tac: Support concatenating multiple files (#6970) 2021-05-09 15:47:16 +02:00
Eric Butler
5d14636b95 WindowServer: Open window menu on Alt+Space
Adds a keyboard shortcut Alt+Space that opens the window menu.
2021-05-09 15:38:32 +02:00
Eric Butler
967cd6afd2 WindowServer: Select last menu item when up key pressed if no selection
When a menu is first opened and has no selected item, pressing the "up"
key now selects the last menu item instead of the first.
2021-05-09 15:38:32 +02:00
Gunnar Beutner
dae2a59c77 LibC: Add declarations for various C11 math functions 2021-05-09 15:35:01 +02:00
Gunnar Beutner
b223233b15 Toolchain+Ports: Skip link tests for libstdc++v3
This makes stdlib.h and stdio.h functions available in the std
namespace for C++.

libstdc++v3's link tests can fail if you don't have an up-to-date
build directory, for example:

1. Have libc with missing _Exit symbol because you haven't done
   a build since that was added.

2. Run toolchain rebuild. libstdc++v3's configure script will
   realize that it can do link tests in general but will fail
   later on when it tries to link a program that tests for _Exit.

Even though this is a toolchain patch this does not necessarily
require rebuilding the toolchain right away. This is only required
once we start using any of these new members in the std namespace,
e.g. for ports.
2021-05-09 15:35:01 +02:00
Gunnar Beutner
9ffc2fe840 LibC: Implement the _Exit function
libstdc++v3 checks whether this function is available and makes
certain functions available in the std namespace if so.
2021-05-09 15:35:01 +02:00
Gunnar Beutner
4c6a91d0c0 LibC: Implement vscanf
libstdc++v3 checks whether vscanf is available and only then makes C99
stdio functions available in the std namespace.
2021-05-09 15:35:01 +02:00
Gunnar Beutner
e6747fefa7 Toolchain+LibM: Make C++ standard library math functions available
With this fixed we get libstdc++v3's aliases for C99 math functions
in the std namespace. Unfortunately for this to work the toolchain
needs to be rebuilt.

The good news are that this by itself does not require a toolchain
rebuild just yet.
2021-05-09 15:35:01 +02:00
Eric Butler
bf31b0da7d Documentation: Suggest using genext2fs on macos
This is a nice alternative to dealing with fuse, and a step forward
towards not requiring root.
2021-05-09 15:34:12 +02:00
Eric Butler
1a48609c6b Meta: Always try genext2fs as fallback to build disk image
If mounting disk image fails (e.g. fuse is not available on macos),
always try using genext2fs before giving up.
2021-05-09 15:34:12 +02:00
Gunnar Beutner
e0fe38ea25 CatDog: Help the user debug their programs
This adds helpful speech bubbles to CatDog. CatDog just wants to
help, that's all.
2021-05-09 15:21:23 +02:00
Gunnar Beutner
da5923bc54 CatDog: Rename root_widget to catdog_widget 2021-05-09 15:21:23 +02:00
Gunnar Beutner
e229914a74 CatDog: Move the main widget into its own file 2021-05-09 15:21:23 +02:00
miere43
c5ceff33b5 Browser: Add :nth-child test document 2021-05-09 11:24:04 +02:00
miere43
aa83539d7b LibWeb: Implement :nth-child pseudo-class 2021-05-09 11:24:04 +02:00
miere43
1e0e8b27c0 LibWeb: Allow white space inside pseudo-class arguments 2021-05-09 11:24:04 +02:00
Brian Gianforcaro
10a594e6fe Tests: Fix install of test-js and test-web
When these were moved, there was a copy paste bug in the install
directives of both of these binaries.
2021-05-09 11:04:38 +02:00
Andreas Kling
5007d7bb38 WindowServer: Don't ignore MouseMove events for pressed window buttons
Without this change, window buttons would get stuck in the "pressed"
state as long as the left mouse button was pressed, even if you moved
the mouse cursor out of the button rect.
2021-05-09 10:34:40 +02:00
Andreas Kling
41dc73adc4 Demos: Fix a bunch of incorrect use of GUI::PaintEvent::rect()
A bunch of programs were using the paint event rect as the rect
to draw into. Since the event rect could be any invalidated part
of the widget, we need to be passing the full Widget::rect().
2021-05-09 10:11:30 +02:00
Andreas Kling
6998fa5c54 LibGfx: Change "white_space" => "whitespace"
Whitespace is one word. :^)
2021-05-09 09:59:22 +02:00
Brendan Coles
57c96ce501 UserspaceEmulator: Allow running executables not in PATH 2021-05-09 09:39:40 +02:00
Dylan Katz
3ab37674c6 TextEditor: Add support for SQL highlighting 2021-05-09 09:39:05 +02:00
Dylan Katz
984b6e08cf LibSQL: Add a syntax highlighter 2021-05-09 09:39:05 +02:00
Andreas Kling
5423aba4ef Meta: Fix broken FAQ link in README 2021-05-09 09:15:56 +02:00
Andreas Kling
9d8aa2a57a Taskbar+LibGUI+WindowServer: Shrink taskbar by one pixel
Make the taskbar 27 pixels tall instead of 28. This makes the button
icons and applets vertically centered.

On a related note, this required touching *way* too many places..
2021-05-09 00:11:37 +02:00
Andreas Kling
fbe6c275c9 LibGUI: Clear GUI::TextEditor selection before performing undo/redo
Fixes #6972.
2021-05-08 23:38:46 +02:00
Andreas Kling
194a90884c LibGUI: Remove now-unused undo coalescing timer from GUI::TextEditor
This is no longer used since commands handle merging themselves.
2021-05-08 22:17:51 +02:00
Andreas Kling
ce90d87eb6 LibGUI: Show command name in GUI::TextEditor undo/redo action text
We can now show things like "Undo Insert Text" and "Redo Remove Text"
instead of just "Undo" and "Redo" in menu items. Pretty neat! :^)
2021-05-08 22:17:51 +02:00
Andreas Kling
c670d8c56d LibGUI: Add UndoStack::{undo,redo}_action_text()
These return the action_text() for the current undo and redo commands,
if available.
2021-05-08 22:17:51 +02:00
Andreas Kling
0bfbee4596 LibGUI: Make Command::action_text() virtual
It will be easier for some commands to generate an action text on the
fly instead of having to think of it up front, so a virtual that you
can override seems more convenient here.
2021-05-08 22:17:51 +02:00
Andreas Kling
bfd2ec88f4 LibGUI: Make Action::set_text() update any associated menu items
Now you can change the text of an action and it will actually show
up in the menu. :^)
2021-05-08 22:17:51 +02:00
Andreas Kling
161568103e LibGUI: Remove UndoStack's automatic command combo'ing
UndoStack will now merge adjacent commands *if they want to be merged*
instead of bundling everything you push onto it until you tell it
to "finalize the combo."

This uses less memory and gives applications full control over how
their undo stacks end up. :^)
2021-05-08 22:17:51 +02:00
Andreas Kling
81bc861085 LibGUI: Implement merging of TextDocument's RemoveTextCommand
When deleting text by pressing backspace, the commands will be merged
into a single RemoveTextCommand.
2021-05-08 22:17:51 +02:00
Andreas Kling
ff6bac4854 LibGUI: Implement merging of TextDocument's InsertTextCommand
When performing multiple text insertions in a row, they will now
be merged into a single InsertTextCommand.
2021-05-08 22:17:51 +02:00
Andreas Kling
ff912946ae LibGUI: Support merging of adjacent commands on the UndoStack
When pushing a new command on an undo stack, we will now attempt to
merge it into the stack's current command.

Merging is implemented by overriding the "merge_with(Command const&)"
virtual on GUI::Command. :^)
2021-05-08 22:17:50 +02:00
Andreas Kling
244665d99c LibGUI: Some tweaks for TextEditor's will-execute-command virtual
Renamed the virtual from "on_edit_action" to "will_execute" so it
doesn't clash with our convention for Function hook names.

Also tighten the parameter type to GUI::TextDocumentUndoCommand
since that's the only kind of command it will receive.
2021-05-08 22:17:50 +02:00
Andreas Kling
aaa96e909b LibGUI: Don't fire TextDocument change notification after each command
The undo stack has its own notification mechanism now, and we no longer
piggyback on the document change notifications.
2021-05-08 22:17:50 +02:00
Ali Mohammad Pur
50cb80649f LibWasm: Implement parsing all remaining instructions
With this, we can parse a module at least as simple as the following C
code would generate:
```c
int add(int x, int y) {
    if (x > y)
        return x + y;
    return y - x; // Haha goteeem
}
```
2021-05-08 22:14:39 +02:00
Ali Mohammad Pur
426878c884 LibWasm: Add some more descriptive parse errors
It's much better to tell the user "hey, the magic numbers don't check
out" than "oh there was a problem with your input" :P
Also refactors some stuff to make it possible to efficiently use the
parser error enum without it getting in the way.
2021-05-08 22:14:39 +02:00
Ali Mohammad Pur
aa4d8d26b9 LibWasm: Start implementing a basic WebAssembly binary format parser
This can currently parse a really simple module.
Note that it cannot parse the DataCount section, and it's still missing
almost all of the instructions.
This commit also adds a 'wasm' test utility that tries to parse a given
webassembly binary file.
It currently does nothing but exit when the parse fails, but it's a
start :^)
2021-05-08 22:14:39 +02:00
Ali Mohammad Pur
56a6d7924e AK: Let Result<T, E> know its Value and Error types
It's much easier to ask for T::ValueType than for
RemoveReference<decltype(declval<T>().release_value())>
2021-05-08 22:14:39 +02:00