Commit Graph

16104 Commits

Author SHA1 Message Date
asynts
ea7b7d8ceb Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
fb8d3635d9 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
24888457d5 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
3f23a58fa1 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
7d783d8b84 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
5c5665c1e7 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
6dc2c38fd0 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
7dc3a5ce3f Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
d69a8a9958 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
9229ba0fe9 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
27bc48e06c Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
7b0a1a98d9 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
a348ab55b0 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
c6ebca5b45 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
dd727d1fec Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
67583bc424 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
78b2be5a2a Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
9d588cc9cc Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
5356aae3cc Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
663a6141d8 AK: Add set_debug_enabled method. 2021-01-22 22:14:30 +01:00
Ben Wiederhake
3179065466 Conway: Add interactivity 2021-01-22 22:14:08 +01:00
Ben Wiederhake
cffafd90de Base: More helpful Desktop selection
If Serenity is ever used for more than a few days, the user will be more likely to
want to interact with their home directory than just be dropped at '/'.

Also, we have a Welcome program. Spotlight it!

And finally, there was a missing newline in the build script.
2021-01-22 22:14:08 +01:00
Nico Weber
2ec6bbd7a1 LibGfx: Add a draw_scaled_bitmap() variant that takes a FloatRect as src_rect
Consider

    draw_scaled_bitmap({0, 0, 10, 10}, source, {0, 0, 5, 5}).

Imagine wanting to split that up into two calls, like e.g. the
compositor when redrawing the background with damage rects. You really
want to be able to say

    draw_scaled_bitmap({0, 0, 5, 10}, source, {0, 0, 2.5, 5})

but up to now you couldn't. Now you can.

This makes painting very low-res images (such as tile.png) in mode
"stretch" work much better.
2021-01-22 22:13:53 +01:00
Nico Weber
7278ff6605 LibGfx: Allow comparing Points, Sizes, and Rects of different type 2021-01-22 22:13:53 +01:00
Ben Wiederhake
67cda61b7f Libraries: Add missing headers
A C++ source file containing just
    #include <LibFoo/Bar.h>
should always compile cleanly.

This patch adds missing header inclusions that could have caused weird error
messages if they were used in a different context. Also, this confused QtCreator.
2021-01-22 21:49:54 +01:00
Ben Wiederhake
1e7adf5cb6 LibGUI: Resolve cyclic inclusion
Application.h includes Widget.h which includes Application.h. I'm not entirely
sure what the semantics are in this case, but avoiding this seems to be the
safer approach. In this case, Widget does not actually use Application, so let's
just remove the unused include.
2021-01-22 21:49:54 +01:00
Ben Wiederhake
1ec225f5ba LibCrypto: Make PEM.h able to stand alone
These headers should probably all be converted into proper functions of
LibCrypto, especially since we have shared objects.
2021-01-22 21:49:54 +01:00
Pierre
8e265b512a PixelPaint: adding an option to export as PNG 2021-01-22 20:39:25 +01:00
Pierre
a1d7739607 LibGfx: adding a very simple PNG writer
With this patch it is possible to create PNG files. Only minimal options
are supported. The PNG is created with one big IDAT chunk containing
only non-compressible DEFLATE blocks.
2021-01-22 20:39:25 +01:00
Nico Weber
d1ea418e43 LibGfx: Implement scaling support for draw_tiled_bitmap()
Closes #5017.
2021-01-22 20:39:14 +01:00
Andreas Kling
bfce0fccde su: Drop "id" pledge after switching user 2021-01-22 19:40:30 +01:00
Andreas Kling
2ab9083420 passwd: Drop "rpath" pledge after opening files
We needed this for mkstemp() since it used lstat() internally. Now that
it only uses open(), we don't need to pledge "rpath".
2021-01-22 19:39:44 +01:00
Andreas Kling
b0f19c2af4 LibC: Templatize unique filename enumeration for mkstemp() et al
This allows us to implement mkstemp() with open() directly, instead of
first lstat()'ing, and then open()'ing the filename.

Also implement tmpfile() in terms of mkstemp() instead of mktemp().
2021-01-22 19:39:44 +01:00
Andreas Kling
2cd07c6212 Kernel+Userland: Remove "dns" pledge promise alias
This was just an alias for "unix" that I added early on back when there
was some belief that we might be compatible with OpenBSD. We're clearly
never going to be compatible with their pledges so just drop the alias.
2021-01-22 19:39:44 +01:00
Linus Groh
421587c15c Everywhere: Fix typos 2021-01-22 18:41:29 +01:00
Linus Groh
7ad31651bd Meta: Use a bash shebang for text-to-cpp-string.sh
Previously we had /bin/sh, which might be bash but is run in POSIX mode
on some systems, causing read -r to not work correctly and inserting
newlines when encountering literal "\n" in the source.

Fixes #5040.
2021-01-22 18:41:08 +01:00
Linus Groh
5e95a777e0 Calculator: Give the '9' button a blue foreground color as well 2021-01-22 18:40:55 +01:00
Jonathan Turner
0bf5669ba3
Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
Nico Weber
2fe6a313c2 LibGfx: Implement blit_offset() in terms of blit()
It's less code, and blit() already handles scaled painters.

Fixes the window server asserting in highdpi mode with a centered
background image. Part of #5017.
2021-01-22 17:32:44 +01:00
Maciej Zygmanowski
586c0aa043 LibDebug: Don't assert when running on non-existent executable 2021-01-22 17:00:24 +01:00
Nico Weber
c98055de75 LibGfx: Remove Painter::blit_scaled() in favor of Painter::draw_scaled_bitmap()
draw_scaled_bitmap() has a clearer API (just source and dest rects --
blit_scaled() took those and scale factors and then ignored width and
height on the source rect and it was less clear what it was supposed to
do), and they do mostly the same thing.

The draw_scaled_bitmap() API takes an IntRect as source rect, so it's
currently not always possible to split a big draw_scaled_bitmap() into
two (or more) smaller draw_scaled_bitmap() calls that do the same thing
-- that'd require FloatRects. The compositor kind of wants this to be
possible, but there's already a FIXME about this not looking quite right
with the previous approach either.

draw_scaled_bitmap() handles transparent sources, so after this change
wallpapers with transparency will be blended instead of copied. But that
seems fine, and if not, the Right Fix for that is to remove the alpha
channel from wallpapers after loading them anyways.

As an added bonus, draw_scaled_bitmap() already handles display scale,
so this fixes window server asserts for background images that are shown
as "stretch" (#5017). The window server still asserts for "tile" and
"offset" for now though.

Calling draw_scaled_bitmap() here exposed a bug in it fixed by #5041.
Before that is merged, this change here will cause smearing on the
background image when moving windows around.
2021-01-22 16:58:41 +01:00
Nico Weber
6a78e7e6a8 LibGfx: Correctly handle source rect offset in draw_scaled_bitmap
The do_draw_integer_scaled_bitmap() fastpath already handled this
correctly, but the arbitrary scale path did not.
2021-01-22 16:58:23 +01:00
Nico Weber
d5f403663b LibGfx: Compute hscale/vscale inside do_draw_scaled_bitmap instead of passing it in
They're both read only inside do_draw_scaled_bitmap(), so there's no
point in computing them earlier.

No behavior change.
2021-01-22 16:54:31 +01:00
Emanuele Torre
5df714cd22 Build: Replace explicit use of mv(1) in CMake file with file(RENAME).
Also fix code style: `else ()` -> `else()`.
2021-01-22 11:29:52 +01:00
Ben Wiederhake
7980268b7b Meta: Document QtCreator 'lic' auto-complete 2021-01-22 11:28:07 +01:00
Ben Wiederhake
58f25092c7 Meta: Fix silly copyright line 2021-01-22 11:28:07 +01:00
Tom
9943816e83 LibPthread: Fix asserting futex return value
FUTEX_WAIT returns the number of threads woken (if any).

Fixes #5032
2021-01-22 11:17:07 +01:00
Linus Groh
efc091df81 Ports: Build python3 with libffi
This makes building the _ctypes module succeed. We still can't import
it, but hey, that's progress! :^)
2021-01-22 11:10:01 +01:00
Doctor5555
6803d5dfbe passwd: Remove duplicate 'wpath' pledge 2021-01-22 11:09:44 +01:00
Tom
2830ce5383 Kernel: Unsupported TTY ioctls should return EINVAL gracefully
Fixes #4971
2021-01-22 09:25:04 +01:00