When files where placed in outside of the project root, they would
appear empty because the label in the tree would differ from the
actual file path relative to the root.
Fixes#5471.
This is rather crude, but you can now use the mouse wheel to scroll up
and down in block-level boxes with clipped overflowing content.
There's no limit to how far you can scroll in either direction, since
we don't yet track how much overflow there is. But it's a start. :^)
We now apply a paint-time clip to the padding rect of a BlockBox before
painting its inline-level children. This covers some of the behavior
we want from "overflow: hidden" etc but is far from a complete solution.
Handling crashes synchronously is finicky since we're modifying the
m_client_state struct while in a callback lambda owned by it.
Let's avoid all the footguns here by simply using deferred_invoke()
and handling the crash on next event loop iteration instead.
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
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.
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.
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.
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. :^)
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}().
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.
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.
- 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.