Commit Graph

18912 Commits

Author SHA1 Message Date
Andreas Kling
679feec195 Browser: Show status tips for any entered action 2021-04-18 10:58:22 +02:00
Andreas Kling
7ceb4f5330 LibGUI: Add some more status tips to common actions 2021-04-18 10:58:22 +02:00
Andreas Kling
a2086ad56e LibGUI: Rename Action::long_text to Action::status_tip
This feels a bit more descriptive.
2021-04-18 10:58:22 +02:00
Gunnar Beutner
aa254ffd66 Meta: Update check-style.sh to ignore CVS $id$ tags
Userlands/Libraries/LibC/sys/exec_elf.h has an $id$ tag
which fails this lint check.
2021-04-18 10:55:25 +02:00
Gunnar Beutner
407b066ba4 Ports: Update the gcc port with the patches from the toolchain 2021-04-18 10:55:25 +02:00
Gunnar Beutner
6cb28ecee8 LibC+LibELF: Implement support for the dl_iterate_phdr helper
This helper is used by libgcc_s to figure out where the .eh_frame sections
are located for all loaded shared objects.
2021-04-18 10:55:25 +02:00
Gunnar Beutner
cf13fa57cd Kernel: Allow system calls from the dynamic loader
Previously the dynamic loader would become unused after it had invoked
the program's entry function. However, in order to support exceptions
and - at a later point - dlfcn functionality we need to call back
into the dynamic loader at runtime.

Because the dynamic loader has a static copy of LibC it'll attempt to
invoke syscalls directly from its text segment. For this to work the
executable region for the dynamic loader needs to have syscalls enabled.
2021-04-18 10:55:25 +02:00
Gunnar Beutner
8dc375da96 LibElf: Allow PT_GNU_EH_FRAME program headers
These are built when compiling an executable with exception support.
2021-04-18 10:55:25 +02:00
Gunnar Beutner
a1e0cf80e8 Toolchain: Colorize the toolchain build script's output 2021-04-18 10:55:25 +02:00
Gunnar Beutner
d7978a3317 Toolchain: Enable -fexceptions and build a separate libstdc++ for the kernel
This enables building usermode programs with exception handling. It also
builds a libstdc++ without exception support for the kernel.

This is necessary because the libstdc++ that gets built is different
when exceptions are enabled. Using the same library binary would
require extensive stubs for exception-related functionality in the
kernel.
2021-04-18 10:55:25 +02:00
Gunnar Beutner
ebca6aabc0 LibC: Make atexit handlers thread-safe 2021-04-18 10:52:05 +02:00
Gunnar Beutner
4075b306f8 LibC+LibPthread: Make sure TLS keys are destroyed after everything else
This ensures that __thread variables can be used when global destructors
are being invoked.
2021-04-18 10:52:05 +02:00
Gunnar Beutner
6eedb570a2 Ports: Enable building ports with ccache 2021-04-18 10:42:41 +02:00
Linus Groh
2b0c361d04 Everywhere: Fix a bunch of typos 2021-04-18 10:30:03 +02:00
Jagger De Leo
cebd3f740b ls: Remove extra spaces after filenames when piping
Fixes #5671
2021-04-18 00:54:39 +02:00
Linus Groh
0d4912826b FileManager: Pluralize empty selection statusbar message properly
"item(s)" is silly, we can be more specific. :^)
2021-04-18 00:48:07 +02:00
Andreas Kling
f07efa1640 Run: Put the window in the bottom left of the desktop
This makes a lot more sense now that it's spawned by the start button.
2021-04-17 23:27:00 +02:00
Andreas Kling
d6c6880674 LibCore: Use is<T> in Object::find_*_of_type helpers
This allows us to add fast-paths for commonly used types.
2021-04-17 23:01:24 +02:00
Idan Horowitz
47dba83d30 Browser: Display full UserAgent string in status bar on menu hover
This uses the new on_action_enter & on_action_leave APIs to display
the full useragent string when hovering over one of the useragent
spoof menu options.
2021-04-17 22:35:13 +02:00
Andreas Kling
b937ebd121 WindowServer: Make MenuItemActivated IPC message pass identifier as u32
This is consistent with the actual storage type.
2021-04-17 22:26:58 +02:00
AnotherTest
fb80d5adda LibLine: Check the terminal size at the start of get_line()
There are cases where the line editor could miss the WINCH signal
(e.g. in the shell, while another program is in the foreground),
This patch makes it so that LibLine notices the change in terminal size
in such cases.
2021-04-17 22:10:35 +02:00
AnotherTest
b58dbc29fc LibLine: Add support for ^X^E
This keybind opens the current buffer in an editor (determined by
EDITOR from the env, or the default_text_editor key in the config file,
and set to /bin/TextEditor by default), and later reads the file back
into the buffer.
Pretty handy :^)
2021-04-17 22:10:35 +02:00
Brendan Coles
258a49346d Ports: AvailablePorts.md: Fix column alignment 2021-04-17 22:01:00 +02:00
Andreas Kling
5e945c5169 LibWeb: Don't load anything for <iframe> without src attribute
Completing an empty URL string from the document base URL will just
return the document URL, so any document that had an "<iframe>"
would endlessly load itself in recursive iframes.
2021-04-17 21:38:38 +02:00
setepenre
c1a0ad764a ls: list files in cwd before listing directories when listing paths 2021-04-17 21:24:56 +02:00
Andreas Kling
ec6debb46f WindowServer: Don't "enter" menu item when hovering over a separator
Since menu separator items don't have an associated identifier,
make sure we don't falsely report that we've enter item 0.

This fixes an issue where hovering over a separator would behave
as if we'd hovered over the first item in the menu wrt sending
MenuItemEntered.
2021-04-17 20:49:53 +02:00
Andreas Kling
e67f392576 TextEditor: Show action long texts in the status bar :^)
We now display a description of the currently hovered action in the
text editor application's status bar. This is pretty cool! :^)

This is currentl achieved via the hooks on GUI::Application. Longer
term we'll probably want to find a more flexible abstraction for this,
since not all applications will be as simple as TextEditor.
2021-04-17 20:49:53 +02:00
Andreas Kling
22ed6a70eb LibGUI: Add "override text" to GUI::Statusbar
Each statusbar segment now has an optional "override text" which can
be set, and if non-null will be displayed instead of the regular text.

This allows programs to display contextual information in the statusbar
temporarily without losing whatever text was already on there.
2021-04-17 20:49:53 +02:00
Andreas Kling
3bf2f7a329 LibGUI: Make GUI::Toolbar buttons generate ActionEnter and ActionLeave
Now you'll get the same event whether you hover an action in a menu
or in a toolbar. :^)
2021-04-17 20:49:53 +02:00
Andreas Kling
7d0b59cb05 LibGUI: Add action enter/leave hooks on GUI::Application
Apps can now hook into these events by assigning a callback to the
on_action_enter and on_action_leave hooks on GUI::Application. :^)
2021-04-17 20:49:53 +02:00
Andreas Kling
4c6f541d5b LibGUI: Add Action* accessors on GUI::Button 2021-04-17 20:49:53 +02:00
Andreas Kling
e7263a7e75 LibGUI: Add a "long text" string to GUI::Action
Actions can now have a longer text description, in addition to its
regular UI string. The longer text will soon be used to display
a more detailed description of hovered actions in statusbars.
2021-04-17 20:49:53 +02:00
Andreas Kling
ba7e1ca2fb WindowServer+LibGUI: Notify GUI clients about menu item enter/leave
We now send out MenuItemEntered and MenuItemLeft messages to the client
when the user hovers/unhovers menu items.

On the client side, these become GUI::ActionEvent, with one of two
types: ActionEnter or ActionLeave. They are sent to the Application.

This will allow GUI applications to react to these events.
2021-04-17 20:49:53 +02:00
Georgiy Komarov
f8c2beec7c
DHCPClient: Fix undefined behaviour when calling memcpy() (#6416)
Calling memcpy with null pointers results in undefined behaviour, even
if count is zero.

This in turns is exploited by GCC. For example, the following code:
    memcpy (dst, src, n);
    if (!src)
      return;
    src[0] = 0xcafe;
will be optimized as:
    memcpy (dst, src, n);
    src[0] = 0xcafe;
IOW the test for NULL is gone.
2021-04-17 20:49:22 +02:00
Linus Groh
eedde500eb LibJS: Replace MAX_U32 with NumericLimits<u32>::max() 2021-04-17 19:35:32 +02:00
Brendan Coles
8e0beda13a Ports: genemu: Pin version to latest release rather than use master branch 2021-04-17 19:25:23 +02:00
Linus Groh
2ac9790883 Meta: Remove stray newline from serenity.sh help text 2021-04-17 19:16:19 +02:00
Brendan Coles
65a89ea67e Ports: vim: Pin version to latest release rather than use master branch 2021-04-17 18:29:50 +02:00
Idan Horowitz
4a2c0d721f LibTextCodec: Implement a Windows-1255 decoder.
This is a superset of ascii that adds in the hebrew alphabet.
(Google currently assumes we are running windows due to not
recognizing Serenity as the OS in the user agent, resulting
in this encoding instead of UTF8 in google search results)
2021-04-17 18:13:20 +02:00
Idan Horowitz
79b1270711 LibJS: Take reference instead of pointer in prepare_arguments_list
This argument is always non-null (and the function assumes so), so
theres no point to taking a pointer instead of a reference.
2021-04-17 17:38:50 +02:00
Panagiotis Vasilopoulos
40c2c24984 Ports: Add imgcat port
Co-authored-by: Linus Groh <mail@linusgroh.de>
2021-04-17 16:28:58 +02:00
Panagiotis Vasilopoulos
3b6454b9c2 Toolchain: Updated QEMU from 5.2.0 to 6.0.0-rc3 2021-04-17 16:11:42 +02:00
Idan Horowitz
6cd318d784 LibJS: Convert matched regex result to string in Symbol.replace
This would crash on an undefined match (no match), since the matched
result was assumed to be a string (such as on discord.com). The spec
suggests converting it to a string as well:
https://tc39.es/ecma262/#sec-regexp.prototype-@@replace (14#c)
2021-04-17 16:10:45 +02:00
Andreas Kling
358697a32f LibGUI: Make sure we depend on the WindowManager IPC endpoints 2021-04-17 15:58:34 +02:00
sin-ack
c8ef8d2db5 Taskbar: Use WM connection for window management operations
Since WM operations are moved to a separate endpoint pair, Taskbar now
uses those to perform window management related operations.
Additionally, it now explicitly declares to WindowServer that it is a
window manager.
2021-04-17 13:06:25 +02:00
sin-ack
aa56f9a1e0 LibGUI+WindowServer: Separate window manager IPC from regular IPC
With this patch the window manager related functionality is split out
onto a new endpoint pair named WindowManagerServer/Client.  This allows
window manager functionality to be potentially privilege separated in
the future.  To this end, a new client named WMConnectionClient
is used to maintain a window manager connection.  When a process
connects to the endpoint and greets the WindowServer as a window manager
(via Window::make_window_manager(int)), they're subscribed to the events
they requested via the WM event mask.

This patch also removes the hardcoding of the Taskbar WindowType to
receive WM events automatically.  However, being a window manager still
requires having an active window, at the moment.
2021-04-17 13:06:25 +02:00
Marcin Gasperowicz
139c04a6e5 Documentation: Change CMake build directory to Build/i686 in CLion config 2021-04-17 12:33:45 +02:00
Gunnar Beutner
7edfe02dff Toolchain: Fix cmake definition for CMAKE_DL_LIBS
We don't have libdl (yet) so update the CMAKE_DL_LIBRARY
definition to match.
2021-04-17 11:40:56 +02:00
Andreas Kling
90f8bc7297 Meta: Add Idan Horowitz to the contributors list :^) 2021-04-17 11:25:22 +02:00
Brendan Coles
a89986608a Ports: c-ray: Pin version to latest commit rather than use master branch 2021-04-17 11:19:33 +02:00