For some reason we were keeping the bits 04777 in file modes. That
doesn't seem right and I can't think of a reason why the set-uid bit
should be allowed to slip through.
(mode & S_IFDIR) is not enough to check if "mode" is a directory,
we have to check all the bits in the S_IFMT mask.
Use the is_directory() helper to fix this bug.
That's what that piece of logic is probably supposed to be doing.
Let's help it acheive that purpose! Apparently the top of the desktop
(i.e. the menubar) was forgotten, so consider it part of the deadzone.
This is based on a comment by @tomuta on #4644, and should prevent all future
instances of bugs like #4644.
Disadvantage: The current implementation may generate a lot of WM_WindowRectChanged
events for a listener while bouncing occurs. Feel free to improve this.
- Unmaximization/untiling had nearly but not quite code duplication;
this patch replaces the actual "regrabbing" logic with Rect::set_size_around.
- When undoing maximization/untiling, it used to be possible to to grab a window
"outside" of its frame, and thus drag it off the screen. This is no longer
possible. Fixes#4644.
- As a side effect, when untiling from the bottom/left/right, the regrab is now
a much smoother experience.
- Setting the resize aspect ratio while being tiled now untiles and umaximizes
the window, as these things are incompatible. Fixes an undocumented bug
(steps to reproduce: maximize, then set aspect ratio).
- When unmaximizing, spurious WindowLeft events were sent, because that path
didn't set hovered_window. Fixes an undocumented bug.
Since these things are interwoven, this is all a single commit.
Previously, SetWindowRect and SetWindowRect could supply basically arbitrary
x and y coordinates. This could happen either due to a malicious or malfunctioning
program, or even due to the auto-centering feature.
This patch also moves the 'normalization' code out of ClientConnection to Window,
where it belongs better.
Fixes#4135.
Fixes#5052.
blit() calls draw_scaled_bitmap() behind the scenes in scaled contexts,
and that doesn't like src_rect to be outside of the source bitmap's
bounds. Implicitly clip with the source rect, like the non-scaled
codepath already does.
Fixes#5017 even more.
This patch makes `Shell::block_on_job()` pump the event loop while the
job it's waiting for hasn't finished.
As this no longer pushes new event loops, it has the effect of
flattening the stack as well.
Fixes#4976.
This adds a separate Markdown document comtaining a table with all
available ports, including name, version number and website.
This should make it easier to get an overview of what's available or
learn more about ports one is not familiar with, as well as checking the
current version of each port (many are outdated by now, and the version
being hidden in the package.sh script doesn't improve that situation)
and spotting ports with no defined version (i.e. install from the main
branch), which can break easily and should be avoided.
Please keep this list in sync when adding or updating ports. :^)
- Remove superfluous function overrides and use makeopts instead
- Remove superfluous installopts
- Use run rather than cd'ing manually
- Ensure empty line between functions
Since devices are enumerable and can compute their own name inside the
/dev hierarchy, there is no need to try and parse "root=/dev/xxx" by
hand.
This also makes any block device a candidate for the boot device, which
now includes ramdisk devices, so SerenityOS can now boot diskless too.
The disk image generated for QEMU is suitable, as long as it fits in
memory with room to spare for the rest of the system.
Besides removing the monolithic DevFSDeviceInode::determine_name()
method, being able to determine a device's name inside the /dev
hierarchy outside of DevFS has its uses.
The kernel ignored the first 8 MiB of RAM while parsing the memory map
because the kmalloc heaps and the super physical pages lived here. Move
all that stuff inside the .bss segment so that those memory regions are
accounted for, otherwise we risk overwriting boot modules placed next
to the kernel.