Commit Graph

32410 Commits

Author SHA1 Message Date
Noah Rosamilia
860d142c8c Ports: Add interactive mode to .port_include.sh
Running `./package.sh interactive` in a port directory will
spawn a new shell with the serenity build environment set up.
This makes porting software much easier as build commands can
be run interactively instead of having to modify package.sh
just to test things.
2022-01-08 22:43:29 -08:00
electrikmilk
b39e516ab3 Base: Add classic terminal font
MS-DOS inspired font for the terminal.
2022-01-08 20:39:39 -08:00
Andreas Kling
3b8b460d73 Base: Remove "Roman" font from Base/home/anon/
It's in Base/res/fonts/ now. :^)
2022-01-09 01:05:06 +01:00
electrikmilk
9dcf3e404d Base: Move Roman to /res/fonts
Roman font was placed in the home folder by mistake
2022-01-09 01:04:38 +01:00
Michel Hermier
69cabb3ead Everywhere: Add serenity_dev_{makedev,major,minor}
Add them in `<Kernel/API/Device.h>` and use these to provides
`{makedev,major,minor}` in `<sys/sysmacros.h>`. It aims to be more in
line with other Unix implementations and avoid code duplication in user
land.
2022-01-09 00:58:44 +01:00
creator1creeper1
d4484f4de3 HackStudio: Propagate errors using try_set_main_widget
The documentation tooltip and parameters hint tooltip initialization
functions are now fallible and now call try_set_main_widget
instead of set_main_widget. They are only called by Editor's new
custom try_create function.
2022-01-09 00:56:11 +01:00
creator1creeper1
4c0b8a70e2 HackStudio: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
cb3a643f35 Inspector: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
45e68b2aa4 PixelPaint: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
6f283a8e60 Piano: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
1b42aff9b5 Welcome: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
f17bd66ecc Mail: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
a76e97df64 PDFViewer: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
77ad98ab7c Calculator: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
20a7cb3004 VideoPlayer: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
c1dc5ef9d7 KeyboardMapper: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
26eee2c02d SystemMonitor: Propagate errors using try_set_main_widget
build_process_window now uses try_set_main_widget and might return an
error. process_properties_action handles a possible error by simply
not updating the process window if an error occured while building it.
2022-01-09 00:56:11 +01:00
creator1creeper1
c60f05b28e 3DFileViewer: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
deed6388ef FontEditor: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
creator1creeper1
de82901d4c TextEditor: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
bugreport0
6c049ea4c4 LibGUI+WindowServer: Flash menubar menu when using a keyboard shortcut
Briefly flash the menubar menu containing the keyboard shortcut action
to give the user immediate visual feedback on their interaction with the
system.
2022-01-09 00:54:46 +01:00
Lucas CHOLLET
ed0f4bdfaf Shell: Port to LibMain 2022-01-09 03:22:10 +03:30
Lucas CHOLLET
3fa5be655d LibCore: Add a wrapper for setsid() 2022-01-09 03:22:10 +03:30
Leonardo Nicolas
9aa0cf3265 FileManager: Do not allow rename files that cannot be modified
Pressing the F2 key on files that the user doesn't have permission was
opening the file name for editing.

This patch fixes the issue disabling the file name editing when the user
doesn't have permission to do it.

To reproduce the issue:

1) Open the File Manager
2) Click on the /etc directory
3) Select any file
4) Press the F2 key
5) Update the file name
2022-01-09 00:47:48 +01:00
Pankaj Raghav
0a1b34c753 Kernel: Use DMA helper everywhere
Port UCHI, AC97, SB16, BMIDEChannel and AHCIPort to use the helper to
allocate DMA buffers.
2022-01-09 00:45:38 +01:00
Pankaj Raghav
59da9bd0bd Kernel: Overload DMA helper without Physical Page output parameter
Not all drivers need the PhysicalPage output parameter while creating
a DMA buffer. This overload will avoid creating a temporary variable
for the caller
2022-01-09 00:45:38 +01:00
Pankaj Raghav
e79f94f998 Kernel: Set Cacheable parameter to NO explicitly in DMA helpers
The cacheable parameter to allocate_kernel_region should be explicitly
set to No as this region is used to do physical memory transfers. Even
though most architectures ignore this even if it is set, it is better
to make this explicit.
2022-01-09 00:45:38 +01:00
Mustafa Quraish
c5fb55725e PixelPaint: Only clear LayerListWidget if there are no editors left
Previously, we would clear it if there was still an editor open. This
was not obvious because it was only visible when an inactive tab was
closed, since closing an active tab would trigger an editor change
which would re-fill the layers widget.
2022-01-09 00:19:47 +01:00
Mustafa Quraish
6c60bf7537 PixelPaint: Move request_close_editor() logic inside ImageEditor
This allows us to request any specific editor to close itself. Earlier,
this could only be done for the currently active editor, so trying to
close inactive tabs would not work properly.
2022-01-09 00:19:47 +01:00
Mustafa Quraish
c2b3bab984 PixelPaint: Move save and save_as logic inside ImageEditor
Previously the save logic was hardcoded to only work for the active
editor, so closing editors in the background would not properly
handle the unsaved changes. This patch brings us closer to be able
to fix that problem.
2022-01-09 00:19:47 +01:00
Maciej
b3e47f0bd5 Documentation: Update glyph/x-fonteditor format description 2022-01-09 00:18:46 +01:00
Maciej
310fdd87d1 ClipboardHistory: Update to new glyph format 2022-01-09 00:18:46 +01:00
Maciej
1d98499234 FontEditor: Support selection ranges
This makes editing much easier, e.g. you don't need longer to copy
hundreds of glyphs one by one.

It has some flaws, e.g. it's not integrated with undo stack,
but we need to start with something!
2022-01-09 00:18:46 +01:00
Maciej
ad2551e6b8 AK: Add ByteBuffer::append(char) 2022-01-09 00:18:46 +01:00
Maciej
22b3c25f10 FontEditor: Save scale to config file 2022-01-09 00:18:46 +01:00
Maciej
4d4764e0fb FontEditor: Display something for emoji glyphs
This commit makes FontEditor displaying emojis in GlyphMapWidget. They
are not editable, what is marked by red background of a glyph.

Additionally, a proper information is displayed in statusbar.

Fixes #10900.
2022-01-09 00:18:46 +01:00
electrikmilk
923bec28b7 Base: Add Serif font
Add default Serif font.
2022-01-09 00:14:05 +01:00
Liav A
ac2c01320b Kernel/PCI: Split host bridge code from the Access singleton
Two classes are added - HostBridge and MemoryBackedHostBridge, which
both derive from HostController class. This allows the kernel to map
different busses from different PCI domains in the same time. Each
HostController implementation doesn't take the Address object to address
PCI devices but instead we take distinct numbers of the PCI bus, device
and function as it allows us to specify arbitrary PCI domains in the
Address structure and still to get the correct PCI devices. This also
matches the hardware behavior of PCI domains - the host bridge merely
takes memory operations or IO operations and translates them to
addressing of three components - PCI bus, device and function.

These changes also greatly simplify how enumeration of Host Bridges work
now - scanning of the hardware depends on what the Host bridges can do
for us, so in case we have multiple host bridges that expose a memory
mapped region or IO ports to access PCI configuration space, we simply
let the code of the host bridge to figure out how to fetch data for us.

Another semantical change is that a PCI domain structure is no longer
attached to a PhysicalAddress, so even in the case that the machine
doesn't implement PCI domains, we still treat that machine to contain 1
PCI domain to treat that one host bridge in the same way, like with a
machine with one or more PCI domains.
2022-01-08 23:49:26 +01:00
Sviatoslav Peleshko
46f6c86362 InspectorServer: Use the 32-bit data length when sending a request
`length` was inheriting `size_t` type of the `String::length()`, while
everywhere else in the Inspector we expect fixed 32-bit field. On the
architectures where `sizeof(size_t) != sizeof(u32)` this broke the
Inspector communication completely.
2022-01-08 23:48:46 +01:00
Rummskartoffel
1b8012e5c7 UserspaceEmulator: Fail with EINVAL for mmap with size 0
This is the behaviour specified by POSIX and also the behaviour of the
real kernel, so let's follow that while emulating.
2022-01-08 23:43:09 +01:00
Rummskartoffel
89502fc329 UserspaceEmulator: Interpret zero-alignment as page-sized alignment
This commit fixes an issue where zero-alignment would lead to the
requested range being allocated outside of the total available range,
hitting an assert in RangeAllocator::allocate_anywhere().
2022-01-08 23:43:09 +01:00
Linus Groh
963b0f76cf LibJS: Remove now unused VM::{set_,}last_value()
This was effectively replaced by correct use of completions, including
UpdateEmpty semantics.
2022-01-08 23:43:03 +01:00
Linus Groh
eb60d16549 LibJS: Convert Interpreter::run() to ThrowCompletionOr<Value>
Instead of making it a void function, checking for an exception, and
then receiving the relevant result via VM::last_value(), we can
consolidate all of this by using completions.

This allows us to remove more uses of VM::exception(), and all uses of
VM::last_value().
2022-01-08 23:43:03 +01:00
creator1creeper1
f73afbb5ae AK: Reorder functions in FixedArray so that mutable comes before const 2022-01-08 22:54:05 +01:00
creator1creeper1
18a2685c6a AK: Reorder access in FixedArray so that m_size comes before m_elements 2022-01-08 22:54:05 +01:00
creator1creeper1
3c05261611 AK+Everywhere: Make FixedArray OOM-safe
FixedArray now doesn't expose any infallible constructors anymore.
Rather, it exposes fallible methods. Therefore, it can be used for
OOM-safe code.
This commit also converts the rest of the system to use the new API.
However, as an example, VMObject can't take advantage of this yet,
as we would have to endow VMObject with a fallible static
construction method, which would require a very fundamental change
to VMObject's whole inheritance hierarchy.
2022-01-08 22:54:05 +01:00
Andreas Kling
a7b70c62d7 Kernel: Fix broken disk cache behavior with O_DIRECT
When writing into a block via an O_DIRECT open file description, we
would first flush every dirty block *except* the one we're about to
write into.

The purpose of flushing is to ensure coherency when mixing direct and
indirect accesses to the same file. This patch fixes the issue by only
flushing the affected block.

Our behavior was totally backwards and could end up doing a lot of
unnecessary work while avoiding the work that actually mattered.
2022-01-08 20:15:25 +01:00
Andreas Kling
95df924e0e Kernel: Remove EWHYTHO error code :^)
This error code was a hack for catching error handling mistakes in the
kernel. It's no longer used anywhere.
2022-01-08 20:10:58 +01:00
Andreas Kling
065f79990e Kernel: Rename DiskCache::get() to ensure()
Since this function always returns a CacheEntry& (after potentially
evicting someone else to make room), let's call it "ensure" instead of
"get" to match how we usually use these terms.
2022-01-08 19:57:33 +01:00
Andreas Kling
0e70759271 AK: Unbreak ref counting hooks in RefCounted
Same fix as 5871072ed3, but for userspace
this time. Regressed in c4a0f01b02.
2022-01-08 19:38:00 +01:00