Commit Graph

917 Commits

Author SHA1 Message Date
Simon Wanner
06ece474e9 LibX86: Add {Address,Operand}Size::Size64
For now the opcode tables for OperandSize::Size64 are empty
2022-11-26 12:50:38 +01:00
Simon Wanner
a7268c3c74 LibX86+UserspaceEmulator: Introduce AddressSize and OperandSize enums
These replace the bools a32 and o32, which will make implementing
64-bit sizes possible. :^)
2022-11-26 12:50:38 +01:00
Karol Kosek
0b7f5bbdfb Userland: Accept drag_enter events for widgets supporting file drops
This patch will switch cursor to DragCopy when a user enters a widget
while dragging file(s), giving them a visual clue that it *might* be
dropped into this widget.

This is a rather naive approach, as the cursor icon will change for any
kind of file, as currently programs don't know the drag contents before
dropping it. But after all I think it's better than nothing. :^)
2022-11-13 16:13:03 -07:00
Tim Schumacher
ce2f1b845f Everywhere: Mark dependencies of most targets as PRIVATE
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.

Also included are changes to readd now missing dependencies to tools
that actually need them.
2022-11-01 14:49:09 +00:00
Tim Schumacher
7834e26ddb Everywhere: Explicitly link all binaries against the LibC target
Even though the toolchain implicitly links against -lc, it does not know
where it should get LibC from except for the sysroot. In the case of
Clang this causes it to pick up the LibC stub instead, which might be
slightly outdated and feature missing symbols.

This is currently not an issue that manifests because we pass through
the dependency on LibC and other libraries by accident, which causes
CMake to link against the LibC target (instead of just the library),
and thus points the linker at the build output directory.

Since we are looking to fix that in the upcoming commits, let's make
sure that everything will still be able to find the proper LibC first.
2022-11-01 14:49:09 +00:00
kleines Filmröllchen
b8567d7a9d Kernel: Make scheduler control syscalls more generic
The syscalls are renamed as they no longer reflect the exact POSIX
functionality. They can now handle setting/getting scheduler parameters
for both threads and processes.
2022-10-27 11:30:19 +01:00
Timothy Flynn
67e396d931 GMLPlayground: Replace /proc/all unveil with /sys/kernel/processes
This was missed before commit dc5b28e26c.

Fixes #15809.
2022-10-26 18:41:11 +01:00
Gunnar Beutner
288c46dbdc LibGUI: Make sure combobox list windows can't be moved
This is done by adding a new window type (Popup) and using it for the
combobox list window. Other incorrect uses of the Tooltip window type
have also been updated to use the new window type.
2022-10-26 17:02:00 +02:00
Liav A
5dfb2b18f3 Applications: Use new global variables at /sys/kernel/ directory 2022-10-25 15:33:34 -06:00
demostanis
34acae90c7 Userland: Let applications make use of make_command_palette_action() 2022-10-25 10:21:18 +01:00
crpz1
30dc304429 Inspector: Reopen picker UI after selecting Inspector 2022-10-24 23:58:13 +01:00
demostanis
3e8b5ac920 AK+Everywhere: Turn bool keep_empty to an enum in split* functions 2022-10-24 23:29:18 +01:00
Karol Kosek
37729f5b91 GMLPlayground: Restrict filesystem access using unveil() 2022-10-24 23:09:30 +01:00
Karol Kosek
25104a30c1 GMLPlayground: Open and save files using FileSystemAccessClient 2022-10-24 23:09:30 +01:00
Samuel Bowman
5e26bb7643 GMLPlayground: Allow previewing GML in a separate window
Previously, Playground would always preview the rendered GML in a frame
next to the editor. This can be annoying when trying to work with small
or large widget hierarchies since the size of the preview is tied to the
size of the editor. Now there is a view menu which allows you to toggle
between the frame or a separate window which can be resized independent
of the editor.
2022-10-15 23:16:38 +02:00
Gunnar Beutner
31bd5b1a02 AK+Userland: Stub out code that isn't currently implemented on AARCH64
Even though this almost certainly wouldn't run properly even if we had
a working kernel for AARCH64 this at least lets us build all the
userland binaries.
2022-10-14 13:01:13 +02:00
Ali Mohammad Pur
166a905951 Userland: Properly populate GENERATED_SOURCES
We previously put the generated headers in SOURCES, which did not mark
them as GENERATED (and did not produce a proper dependency).
This commit moves all generated headers into GENERATED_SOURCES, and
removes useless header SOURCES.
2022-10-12 15:55:15 +01:00
Timothy Slater
eb9db167da HackStudio: Set proper action scope for editor shortcuts
This fixes issue #14429. The editor actions were not given a parent as
scope so defaulted to global. Because HackStudio can have multiple
editors and even multiple editor tab widgets, I chose the
VerticalSplitter that all editor tab widgets get added to as the parent.
With a Widget set as the parent, the action gets WidgetLocal scope and
allows the embedded terminals to receive shortcuts.

Thanks to Andreas for doing a quick look at this and pointing in the
right direction during an Office Hours stream :)
2022-10-11 11:12:41 +02:00
Itamar
c30c6eb1c1 HackStudio: Use a single global tooltip window
Previously, every Editor instance had two instances of tooltip windows
& `OutOfProcessWebView`s, one for documentation and one for parameter
hints.

They were initialized with the Editor, which slowed down creation of new
tabs.

We use a single global tooltip & OOPWV instance that is shared between
tabs.

Closes #15488

Co-authored-by: Sam Atkins <atkinssj@serenityos.org>
2022-10-06 21:27:40 +01:00
Itamar
2046a670b3 HackStudio: Remove adjustment of text range for documentation tooltip
We no longer need to adjust the hovered span's range to get the correct
hovered text. This fixes the "documentation tooltip" feature.
2022-10-06 21:27:40 +01:00
Marco Cutecchia
41744a4a87 HackStudio: Prevent closing the last editor group
Previously if the user closed the last open tab in the last TabWidget
then the open file action would stop working until they explicitly
went to the View menu and added a new editor group.

Before this commit there was an attempt at preventing the user to
close the last open tab by hiding its close button, this didn't
account for the many other ways one could close it though.
2022-10-06 11:53:23 +01:00
Marco Cutecchia
f81b494182 HackStudio: Remove the 'Open in a new tab' action
This has become the default with the previous changes so it
doesn't make sense anymore
2022-10-06 11:53:23 +01:00
Marco Cutecchia
d8b54b7dd0 HackStudio: Open files in dedicated tabs
Previously when trying to open a file from the tree view the file
would open in the currently selected tab, substituting the file
we were previously reading.
This change makes it so that clicking on a file from the tree view
opens it in a new tab, or selects the tab containing that file if
it's already open in the selected editor group.
2022-10-06 11:53:23 +01:00
Nico Weber
2af028132a AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most places
Doesn't use them in libc headers so that those don't have to pull in
AK/Platform.h.

AK_COMPILER_GCC is set _only_ for gcc, not for clang too. (__GNUC__ is
defined in clang builds as well.) Using AK_COMPILER_GCC simplifies
things some.

AK_COMPILER_CLANG isn't as much of a win, other than that it's
consistent with AK_COMPILER_GCC.
2022-10-04 23:35:07 +01:00
Peter Elliott
7af5eef0dd SystemServer+LoginServer+Userland: Switch to sid-based sockets
This commit does three things atomically:
- switch over Core::Account+SystemServer+LoginServer to sid based socket
  names.
- change socket names with %uid to %sid.
- add/update necessary pledges and unveils.

Userland: Switch over servers to sid based sockets

Userland: Properly pledge and unveil for sid based sockets
2022-10-03 11:11:29 +02:00
Sam Atkins
a58d72656d Userland: Replace empty GUI::Widgets in GML with GUI::Layout::Spacer
This fixes the "Cancel" button on HackStudio's "New Project" dialog
being too small. It's also clearer what these actually are.
2022-09-29 08:31:15 -04:00
networkException
4230dbbb21 AK+Everywhere: Replace "protocol" with "scheme" url helpers
URL had properly named replacements for protocol(), set_protocol() and
create_with_file_protocol() already. This patch removes these function
and updates all call sites to use the functions named according to the
specification.

See https://url.spec.whatwg.org/#concept-url-scheme
2022-09-29 09:39:04 +01:00
Sam Atkins
454bf1fde0 HackStudio: Insert tooltip styling directly into Markdown HTML output 2022-09-28 23:58:26 +01:00
ne0ndrag0n
d463b8e6fb SQLStudio: Save and load blank files without failing assertion 2022-09-27 14:38:50 +01:00
Sam Atkins
68032d2724 Profiler: Port to Core::Stream 2022-09-20 07:48:45 -04:00
Brian Gianforcaro
d0a1775369 Everywhere: Fix a variety of typos
Spelling fixes found by `codespell`.
2022-09-14 04:46:49 +00:00
Timothy Flynn
fc8bf7ac3e LibUnicode+Userland: Migrate generated CLDR data to LibLocaleData
Currently, LibUnicodeData contains the generated UCD and CLDR data. Move
the UCD data to the main LibUnicode library, and rename LibUnicodeData
to LibLocaleData. This is another prepatory change to migrate to
LibLocale.
2022-09-05 14:37:16 -04:00
Jelle Raaijmakers
a373542f4c Profiler: Display correctly rounded percentages as '#.##%' 2022-08-31 16:57:40 +01:00
Skye Sprung
4370e8f80a HackStudio: Warn of unsaved changes before making a new project
Before, the warning dialog would be opened after the NewProjectDialog,
leading to focus-fighting by the two windows. This fixes that and makes
the action more consistent with the standard serenity way of handling
unsaved changes by asking before the NewProjectDialog is brought up.
The way this is achieved avoids having to rewrite open_project as well.
2022-08-31 15:21:03 +01:00
Skye Sprung
a7b7003376 HackStudio: Fix crash when opening or creating with open empty file
This commit fixes a crash that would occur due to an unnamed file being
automatically saved via EditorWrapper::save(). Now, we throw up a
FilePicker::get_save_filepath.
2022-08-31 15:21:03 +01:00
thankyouverycool
cce9172cd4 Applications+DevTools: Remove fixed sizes from Splitters
And adjust some GML properties. Since a808cfa, splitters grow
opportunistically. Setting them to fixed sizes now quite literally
fixes them in place. Fixes immovable splitters missed in the
aforementioned commit.
2022-08-30 16:28:44 +01:00
thankyouverycool
589572cfa4 LibGUI+WindowServer: Introduce WindowModes
Previously, Windows only understood blocking modality: Windows were
either modal, i.e., in a blocking state, or not. Windows could also
be set as Accessories or ToolWindows, attributes which technically
applied modes to their parents but were implemented ad hoc. This patch
redefines these modal effects as WindowModes and sets up some helpers.
This will let us simplify a lot of modal logic in the upcoming patches
and make it easier to build new modal effects in the future.

Windows can now set 1 of 5 modes before reification:
-Modeless:	No modal effect; begins a new modal chain
-Passive:	Window joins its modal chain but has no effect
-RenderAbove:	Window renders above its parent
-CaptureInput:	Window captures the active input role from its parent
-Blocking:	Window blocks all interaction with its modal chain

States like fullscreen and tiling are dynamic and don't alter behavior
in modal chains, so they aren't included.
2022-08-25 13:28:50 +02:00
Jose Flores
355911c44e SQLStudio: Reset status bar and menu actions when closing a tab 2022-08-23 19:08:26 +01:00
Tim Schumacher
5f99934dce Userland: Consolidate most PATH resolving into a single implementation
We previously had at least three different implementations for resolving
executables in the PATH, all of which had slightly different
characteristics.

Merge those into a single implementation to keep the behaviour
consistent, and maybe to make that implementation more configurable in
the future.
2022-08-23 19:00:04 +01:00
Tim Schumacher
39a3775f48 Userland: Rely on a single authoritative source for the default PATH 2022-08-23 19:00:04 +01:00
David Smith
0b9d83fe0d Profiler: Fix unmovable splitter
Set preferred height instead of fixed height to allow the splitter to
move.

The splitter respects set_fixed_height() after a808cfa7 "LibGUI+
Applications: Govern Splitter resizing by opportunistic growth", and
that caused the splitter in Profiler to stop working.
2022-08-16 16:53:24 +02:00
Lucas CHOLLET
267a2c7c32 Base: Launch LanguageServers at session start-up 2022-08-14 21:52:35 +01:00
Lucas CHOLLET
c248569d6b Base: Launch InspectorServer at session start-up 2022-08-14 21:52:35 +01:00
Lucas CHOLLET
1b36348d8b LibCore+LibIPC: Recognise %uid in path
This patch allows to insert "%uid" in `IPC_CLIENT_CONNECTION`
declaration and in SystemServer's ini files. This pattern is replaced
then replaced by the UID of the owner of the service. It opens a path
for seamlessly managed, per-user portal.
2022-08-14 21:52:35 +01:00
Federico Guerinoni
8753dc72e8 HackStudio: Fix update modified document on tab widget
Closes #14297
2022-08-13 16:43:18 +01:00
Junior Rantila
9c42a75381 HackStudio: Add fullscreen shortcut 2022-08-10 08:42:53 +01:00
David Smith
1bdaf92414 Profiler: Add scrollbar to FlameGraphView
The flame graph view used to draw only so much of the graph that could
be displayed. Change to draw the whole graph, and add a scrollbar.

Does some tricks with the scrolling to keep the bottom of the graph
fixed when resizing or double-clicking, since it works better then.
2022-08-04 02:52:39 +02:00
Undefine
97cc33ca47 Everywhere: Make the codebase more architecture aware 2022-07-27 21:46:42 +00:00
David Smith
c2a1817c70 Profiler: Fix use after free in FlameGraphView
Layout cleared the list of bars in the flame graph, but didn't clear the
reference m_hovered_bar. This could cause a crash in mousedown_event()
when clicking twice: the first click caused layout, the second used
the old reference.
2022-07-24 23:19:09 +01:00
Tim Schumacher
5870484d1a LibC: Remove the LibPthread interface target 2022-07-19 11:00:35 +01:00