Commit Graph

17130 Commits

Author SHA1 Message Date
thankyouverycool
bbbcddb252 LibGUI: Ignore glyph dimensions when painting a titleless GroupBox 2021-02-22 09:21:30 +01:00
thankyouverycool
3e987eba2b TextEditor+LibGUI: Add case matching and wrap around optionality
Adds simple ASCII case matching and wrap around toggles to
TextEditor's find/replace widget and reorganizes its layout
2021-02-22 09:21:30 +01:00
Tom
b4c0314f1d WindowServer: Don't close context menus when hovering over menu bar 2021-02-22 09:09:26 +01:00
Tom
35363a972a WindowServer: Reset menu position when opened by the menu bar
Also, only mark the menu bar item as opened if a menu was actually
opened through the menu bar.

These changes allow a menu to be used both in the menu bar as well
as a context menu.

Fixes #5469
2021-02-22 09:09:26 +01:00
AnotherTest
bd318dcdcd Toolchain: Always remove the previous artifacts when building 2021-02-21 23:50:34 +01:00
Jorropo
7b156a7add
Documentation: Combine two "cd" commands in build instructions (#5457) 2021-02-21 23:49:56 +01:00
Kevin Kuehler
c909f7001c keymaps: Add dvorak-programmer
I left the numpad the same as qwerty because I don't have a keyborad
with a numpad and don't know if those keys change or not.
2021-02-21 23:48:57 +01:00
Andreas Kling
9194a97cbe LibWeb: Add Document.createRange()
Also tidy up DOM::Range a little bit while we're here, and unify the
way we create them to use a delegating constructors.
2021-02-21 23:48:01 +01:00
Sviatoslav Peleshko
ff018607a1 SpaceAnalyzer: Added context menu for nodes
Currently supports 3 actions: Open, Copy Path, and Delete.
2021-02-21 23:47:49 +01:00
Mițca Dumitru
8d6525fc50 LibGUI: Show context menu when right-clicking a LinkLabel
Fixes #4794
2021-02-21 23:47:05 +01:00
Tom
8d2d080923 CatDog: Fix wake-sleep "loop" when cursor is over right-top of head
Because re-evaluation of the hovered window may trigger sending a
MouseMove event to a window we should only wake it if the mouse
position actually has changed.
2021-02-21 23:45:04 +01:00
Tom
2677e24a99 LibGUI: Copy alpha channel as-is when keeping backing bitmaps in sync 2021-02-21 23:45:04 +01:00
Ben Wiederhake
3084291625 LibGUI: Fix crash when previewing palette images
For example, navigating File Manager to a directory that contains a vaild BMP file that
uses a palette, this code would end up trying to create an indexed thumbnail.
However, Painter asserts that the thumbnail that we paint on is *not* indexed,
usually crashing File Manager.

Partially fixes #5299, as it now crashes somewhere else.
2021-02-21 22:34:09 +01:00
Ben Wiederhake
e3c00c93ae Utilities: Provide fuzzers as a utility in serenity 2021-02-21 22:34:09 +01:00
Ben Wiederhake
44649517e4 Documentation: QtCreator likes BOMs, our linter doesn't 2021-02-21 22:34:09 +01:00
Ben Wiederhake
b46da5c2cb Meta: Make CMakeLists accessible to QtCreator
We end up having to edit various CMakeLists.txt all the time, and having to open
them in a different editor becomes old quite fast.
2021-02-21 22:34:09 +01:00
Tom
2d29bfc89e WindowServer: Re-evaluate the mouse cursor when alpha hit-testing
A window repaint may change the alpha value, resulting in a different
hit test outcome. In those cases, re-evaluate the cursor hit testing
after a window was painted, and update the cursor if needed.
2021-02-21 22:34:00 +01:00
Andreas Kling
bd830c2dfe LibCpp: Fix yet another broken outln() invocation..
Fixes #5463
2021-02-21 22:13:32 +01:00
Linus Groh
4166765292 Ports: Update Python to 3.9.2
Released on 2021-02-19, no patch changes required.
https://www.python.org/downloads/release/python-392/
2021-02-21 21:44:52 +01:00
Andreas Kling
15cfde7233 LibWeb: Expose the Window object as Document.defaultView
This should really be a WindowProxy? but since we don't have anything
representing that concept yet, let's just expose the Window object
directly so document.defaultView.foo works. :^)
2021-02-21 21:32:16 +01:00
Andreas Kling
7f66a4e3ba LibJS: Print console.{debug,error,info,log,warn} to system debug log 2021-02-21 21:32:16 +01:00
Andreas Kling
0bb2729423 LibCpp: Fix busted outln() invocations 2021-02-21 21:32:16 +01:00
TheMorc
67d5c9e154 Run: Prefill text field with last command on launch
Fixes #5446
2021-02-21 20:21:56 +01:00
Linus Groh
a4f80ee658 LibWeb: Replace WrapperGenerator's snake_name() with String::to_snakecase()
This now turns "createHTMLDocument" into "create_html_document", that's
another FIXME gone. :^)
2021-02-21 19:47:47 +01:00
Linus Groh
4fafe14691 AK: Add String{,Utils}::to_snakecase()
This is an improved version of WrapperGenerator's snake_name(), which
seems like the kind of thing that could be useful elsewhere but would
end up getting duplicated - so let's add this to AK::String instead,
like to_{lowercase,uppercase}().
2021-02-21 19:47:47 +01:00
AnotherTest
43948aee51 LibC: Don't #define away __{BEGIN,END}_DECLS in stdarg.h
That would force anything that includes this to have language-specific
linkage, and absolutely break `sys/cdefs.h`.

Fixes #5452.
2021-02-21 18:27:50 +01:00
Mițca Dumitru
255da9b02b FileManager: Use newly introduced LibCore file management helpers
Most of the functions under FileUtils were removed, except those which
dealt with file deletion, as they spawned MessageBoxes for errors, as
such, those functions were written in terms of Core::File::remove.
2021-02-21 18:14:29 +01:00
Mițca Dumitru
ecafee86f8 rm: Use Core::File::remove 2021-02-21 18:14:29 +01:00
Mițca Dumitru
f4569ecf3c Utilities: Remove cp.h
It is no longer used
2021-02-21 18:14:29 +01:00
Mițca Dumitru
edb543657a mv: Use Core::File::copy_file_or_directory 2021-02-21 18:14:29 +01:00
Mițca Dumitru
3f88fd81d1 cp: Use Core::File::copy_file_or_directory 2021-02-21 18:14:29 +01:00
Mițca Dumitru
919492945e LibCore: Add file management helpers to reduce code duplication
FileManager, cp, mv, rm had some duplicated code, implementing basic
file management operations. This patch creates adds functions that try
to provide an interface suited for all these programs, but this patch
does not make them be used throughout the Userland.

They are added to Core::File following the example of functions such as
read_link/real_path_for.
2021-02-21 18:14:29 +01:00
Brian Gianforcaro
d934e77522 Kernel: Use copy_n_from_user in sys$setgroups to check for overflow 2021-02-21 17:12:01 +01:00
Brian Gianforcaro
4743afeaf4 Kernel: Use already computed nfds_checked value when copying from user mode.
- We've already computed the number of fds * sizeof(pollfd), so use it
  instead of needlessly doing it again.

- Use fds_copy.data() instead off address of indexing the vector.
2021-02-21 17:12:01 +01:00
Brian Gianforcaro
1c0e2947d7 Kernel: Use copy_n_from_user in sys$setkeymap 2021-02-21 17:12:01 +01:00
Brian Gianforcaro
2139e0a201 Kernel: Handle overflow in FileDescription::seek(, SEEK_CUR) 2021-02-21 17:12:01 +01:00
Brian Gianforcaro
26bba8e100 Kernel: Populate ELF::AuxilaryValue::Platform from Processor object.
Move this to the processor object so it can easily be implemented
when Serenity is compiled for a different architecture.
2021-02-21 17:06:24 +01:00
Andreas Kling
1e3a6ba572 LibVT: Avoid double relayout during interactive resize
Don't fire the on_terminal_size hook while we're in relayout.
This fixes the terminal window flopping around during interactive
resizing. (It was mostly noticeable if something else was hogging
the CPU at the same time.)
2021-02-21 16:52:22 +01:00
Ivan Hansgaard Hansen
46ca7d3cb5 AK: Alter ByteBuffer to utilise memcmp.
__builtin_memcmp is already heavily utilised in AK.
2021-02-21 16:34:51 +01:00
Andreas Kling
d475460ea1 Base: Add a lion emoji 🦁 2021-02-21 15:07:25 +01:00
Andreas Kling
df8f074cf6 LibJS: Make TypedArray::data() return a Span<T>
This inserts bounds checking assertions whenever we're reading/writing
a typed array from JS.
2021-02-21 14:21:26 +01:00
Andreas Kling
a65f178ce8 AK: Do bounds checking (assertions) in Span::operator[] 2021-02-21 14:21:20 +01:00
Brian Gianforcaro
dae071629f Kernel: Switch m_signal_action_data to Array<...> 2021-02-21 12:54:39 +01:00
Brian Gianforcaro
a977cdd9ac Kernel: Remove unneeded Thread::set_default_signal_dispositions
The `default_signal_action(u8 signal)` function already has the
full mapping. The only caveat being that now we need to make
sure the thread constructor and clear_signals() method do the work
of resetting the m_signal_action_data array, instead or relying on
the previous logic in set_default_signal_dispositions.
2021-02-21 12:54:39 +01:00
Brian Gianforcaro
df73a86875 AK: Add an implementation of Array<T, Size>::fill(...) 2021-02-21 12:54:39 +01:00
Brian Gianforcaro
21a959e29b AK: Add Span<T> constructor for arrays
The array constructor allows arrays to be easily treated
as generic span of data.
2021-02-21 12:54:39 +01:00
Brian Gianforcaro
3019445492 Userland: Use uniform initialization instead of memset 2021-02-21 11:52:47 +01:00
Brian Gianforcaro
cbd8f78cce Kernel: Use uniform initialization instead of memset for a few stack buffer.
Raw memset is relatively easy to mess up, avoid it when there are
better alternatives provided by the compiler in modern C++.
2021-02-21 11:52:47 +01:00
Brian Gianforcaro
7c950c2d01 Kernel: Use ByteBuffer::zero_fill() instead of raw memset in Ext2
There was a typo in one of the memsets, use the type safe wrapper instead.

Fix EXt
2021-02-21 11:52:47 +01:00
Brian Gianforcaro
5e84320ecb AK: Add safe memset() wrapper to ByteBuffer
In the interest memory safety and of removing as many
of foot guns as possible (like raw memset's which are
notorious for typo's), a zeroing method seems like a
useful utility to have on a buffer class.
2021-02-21 11:52:47 +01:00