Commit graph

3935 commits

Author SHA1 Message Date
DragonAlex98 509e39ac00 FileManager: Make DirectoryView open links in their real directory
Previously it was possible to open a link like /home/anon/Desktop/Home,
leading to a folder with the same name. Now it correctly opens its real
path, which is /home/anon

FileManager: Use Core::File::real_path_for to get real path of links
2021-01-24 19:21:54 +01:00
Andreas Kling 5d9c36d016 Run: Pledge "thread"
This is needed for the thumbnail generation thread used by FilePicker.

Fixes #5015.
2021-01-23 09:54:46 +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
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
Pierre 8e265b512a PixelPaint: adding an option to export as PNG 2021-01-22 20:39:25 +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 5e95a777e0 Calculator: Give the '9' button a blue foreground color as well 2021-01-22 18:40:55 +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
Linus Groh 17f90e72b4 CrashReporter: Show pledge violation in backtrace 2021-01-20 21:01:15 +01:00
Linus Groh ea80ff882d Run: Fix newline in info label
This apparently was a workaround for escape sequences in GML at some
point (see #4937), but it now literally inserts "\n" and no newline, as
the backslash itself is escaped.
2021-01-20 19:14:40 +01:00
Andreas Kling 2cd16778b5 AudioServer+LibAudio: Pass audio buffers as Core::AnonymousBuffer
This was the last remaining user of shbufs! :^)
2021-01-17 09:07:32 +01:00
Andreas Kling cc8b3c92ba Everywhere: Remove a bunch of now-unnecessary shared_buffer pledges 2021-01-17 09:07:32 +01:00
Linus Groh d64d2ff07b SpaceAnalyzer: Change tabs to spaces in GML file
This is a four-spaces-for-indentation project! :^)
2021-01-17 08:43:46 +01:00
Nico Weber d7a3128c1d DisplaySettings: Add more resolution choices
These are 2x the smallest 4 resolutions. When picking one of these
in 1x and then half the size in 2x, the window server adjust the
ui scale factor, but the actual framebuffer size doesn't change.

2560x1440 also happens to be 5k resolution and monitors with that
resolution do exist -- so that seems like a good upper limit :)
2021-01-17 08:06:12 +01:00
Nico Weber f37f281f89 DisplaySettings: Add UI for switching the scale factor
For now, only support 1x and 2x scale.

I tried doing something "smarter" first where the UI would try
to keep the physical resolution constant when toggling between
1x and 2x, but many of the smaller 1x resolutions map to 2x
logical resolutions that Compositor rejects (e.g. 1024x768 becomes
512x384, which is less than the minimum 640x480 that Compositor
wants) and it felt complicated and overly magical.

So this instead just gives you a 1x/2x toggle and a dropdown
with logical (!) resolutions. That is, 800x600 @ 2x gives you
a physical resolution of 1600x1200.

If we don't like this after trying it for a while, we can change
the UI then.
2021-01-17 08:06:12 +01:00
Marco Cutecchia 14f075b26d SoundPlayer: Added 'shared_buffer' to pledge
This fixes a crash that occured when opening a file due to not pledging 'shared_buffer'
2021-01-16 22:54:21 +01:00
Brendan Coles aa8cb35b90 TextEditor: Add help documentation 2021-01-16 19:35:08 +01:00
Andreas Kling d312011708 Everywhere: Drop "shared_buffer" in most GUI programs, pledge "recvfd"
Now that WindowServer broadcasts the system theme using an anonymous
file, we need clients to pledge "recvfd" so they can receive it.

Some programs keep the "shared_buffer" pledge since it's still used for
a handful of things.
2021-01-16 19:30:32 +01:00
Andreas Kling c71807a3fc Everywhere: Convert a handful of String::format() => formatted() 2021-01-16 14:52:04 +01:00
Andreas Kling 64610ca80e Everywhere: Remove a bunch of <AK/SharedBuffer.h> includes 2021-01-16 11:26:53 +01:00
Nick Vella 40083444a0 Run: initial implementation of Run app 2021-01-16 09:05:01 +01:00
Linus Groh 6f666c20f5 CrashReporter: Show CPU register state for all threads
Closes #4777 .
2021-01-15 23:26:47 +01:00
Linus Groh 33c31e2198 CrashReporter: Show arguments and environment
Arguments as a simple label, environment in a new tab. :^)

Closes #4779.
2021-01-15 23:26:47 +01:00
Linus Groh 7668e968af LibCoreDump+Crash{Daemon,Reporter}: Make backtraces thread-specific
We want to show an individual backtrace for each thread, not one
containing backtrace entries from all threads.

Fixes #4778.
2021-01-15 23:26:47 +01:00
Linus Groh 3718a16f59 CrashReporter: Put backtrace TextEditor in a TabWidget
Since CrashReporter will be showing more info from coredumps soon, we
need tabs to put those things somewhere! :^)
2021-01-15 23:26:47 +01:00
Linus Groh 568cde5e23 Kernel+LibELF+LibCoreDump+CrashReporter: Use JSON for ProcessInfo
This is in preparation of adding (much) more process information to
coredumps. As we can only have one null-terminated char[] of arbitrary
length in each struct it's now a single JSON blob, which is a great fit:
easily extensible in the future and allows for key/value pairs and even
nested objects, which will be used e.g. for the process environment, for
example.
2021-01-15 23:26:47 +01:00
Nico Weber 63ac9462ad WindowServer: Add a "scale" parameter to the SetResolution message and plumb it through
Now, `chres 640 480 2` can set the UI to HighDPI 640x480 at runtime. A
real GUI for changing the display factor will come later.

(`chres 640 480 2` followed by `chres 1280 960` is very fast since
we don't have to re-allocate the framebuffer since both modes use
the exact same number of physical pixels.)
2021-01-15 22:05:08 +01:00
Cypher87 0f7efd5bf1
FileManager: Added label "Location" to BreadcrumbBar (#4924) 2021-01-15 19:37:27 +01:00
Nico Weber 9abcc2fb6c DisplaySettings: Fix a comment typo 2021-01-15 19:13:46 +01:00
Nico Weber 699ba84bea DisplaySettings: Rename wallpaper setting "scaled" to "stretch"
I want to add a scale factor for picking pixel density, and using
the same terminology for wallpaper handling would be confusing.
2021-01-15 19:13:46 +01:00
Andreas Kling 20915795a8 Everywhere: Pledge "sendfd" in WindowServer client programs
This is needed for the new way we transfer window backing stores.
2021-01-15 14:10:32 +01:00
Mart G 29102051d9 SpaceAnalyzer: Fix TreeMapWidget layout issue for small rects.
For small rects there was a disagreement between two parts of the
layout algorithm. There is a function that decides if there is
enough space in a rectangle for a label. But this function was
called on two slightly different rectangles.
2021-01-14 16:45:55 +01:00
Andreas Kling 1a08ac72ad LibC+Everywhere: Remove open_with_path_length() in favor of open()
This API was a mostly gratuitous deviation from POSIX that gave up some
portability in exchange for avoiding the occasional strlen().

I don't think that was actually achieving anything valuable, so let's
just chill out and have the same open() API as everyone else. :^)
2021-01-12 23:34:01 +01:00
Andreas Kling aea2eac3d1 HexEditor: Hide unnecessary scrollbars in the main file view 2021-01-12 13:31:32 +01:00
Andreas Kling dc28c07fa5 Applications: Move to Userland/Applications/ 2021-01-12 12:05:23 +01:00