Commit Graph

31 Commits

Author SHA1 Message Date
Brian Gianforcaro
2faa73ff7d Applets: Remove unused header includes 2021-08-01 08:10:16 +02:00
TheFightingCatfish
0c53c2dfa2 LibGUI: Add a ClipboardClient for GUI::Clipboard
Anyone who inherits from `GUI::Clipboard::ClipboardClient` will receive
clipboard notifications via `clipboard_content_did_change()`.

Update ClipboardHistoryModel, TextEditor and TerminalWidget to inherit
from this class.
2021-07-27 23:49:25 +02:00
Andreas Kling
027bfc4eff DesktopPicker: Make sure the applet always ends up in the same place 2021-07-22 09:17:01 +02:00
FrHun
7bfd319652 NetworkApplet: Omit unnecessary newline in tooltip 2021-07-22 04:33:41 +02:00
Andreas Kling
c7d891765c LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
2021-07-21 18:02:15 +02:00
LuK1337
de09a92bf8 DesktopPicker: Add mouse wheel control
This lets us use scroll wheel up/down to move between columns and
shift + scroll wheel up/down to move between rows.
2021-07-21 18:04:30 +04:30
Peter Elliott
01248d28ef Applets: Add DesktopPicker applet
This applet displays a grid of desktops, and shows the user what virtual
desktop they are on. When clicked, the desktop will be changed.
2021-07-19 18:21:40 +02:00
brapru
4563d6da8d Applets: Add tooltip for Clipboard History 2021-07-19 10:31:40 +02:00
Tom
a635ff4e60 Everywhere: Make tracking cpu usage independent from system ticks
This switches tracking CPU usage to more accurately measure time in
user and kernel land using either the TSC or another time source.
This will also come in handy when implementing a tickless kernel mode.
2021-07-18 22:08:26 +02:00
Tom
7e77a2ec40 Everywhere: Improve CPU usage calculation
As threads come and go, we can't simply account for how many time
slices the threads at any given point may have been using. We need to
also account for threads that have since disappeared. This means we
also need to track how many time slices we have expired globally.

However, because this doesn't account for context switches outside of
the system timer tick values may still be under-reported. To solve this
we will need to track more accurate time information on each context
switch.

This also fixes top's cpu usage calculation which was still based on
the number of context switches.

Fixes #6473
2021-07-18 22:08:26 +02:00
Tom
c144d358ae ResourceGraph: Handle more than 4 GiB of memory 2021-07-14 18:24:55 +02:00
Daniel Bertalan
f14a4994b0 Everywhere: Don't promote float to double where not needed
The `float => double => float` round trip seen in a couple of places
might pessimize the code. Even if it's truncated to an int in the end,
it's weird not to use the functions with the `f` suffixes when working
with single precision floats.
2021-07-08 10:11:00 +02:00
Gunnar Beutner
631d36fd98 Everywhere: Add component declarations
This adds component declarations so that users can select to not build
certain parts of the OS.
2021-06-17 11:03:51 +02:00
Linus Groh
5e48769487 Applets/Network: Replace fprintf(stderr) with dbgln()
This is an applet, so we're not going to see its stderr anyway.
2021-05-31 17:44:01 +01:00
Andreas Kling
a1e133cc6b LibCore: Make ProcessStatisticsReader return results in a Vector
The HashMap API was overkill and made using this less ergonomic than
it should be.
2021-05-23 11:10:15 +02:00
Gunnar Beutner
e087a65775 Userland: Rename loop0 to loop
Now that the kernel picks a different name for the loopback adapter
we should update userland to account for this.
2021-05-22 15:42:54 +01:00
Andreas Kling
31d4bcf5bf Userland: Tighten a *lot* of pledges! :^)
Since applications using Core::EventLoop no longer need to create a
socket in /tmp/rpc/, and also don't need to listen for incoming
connections on this socket, we can remove a whole bunch of pledges!
2021-05-13 23:28:40 +02:00
Ali Mohammad Pur
1ae8775a1b LibCore+Everywhere: Move SeekMode out of IODevice 2021-05-12 11:00:45 +01:00
Ali Mohammad Pur
a91a49337c LibCore+Everywhere: Move OpenMode out of IODevice
...and make it an enum class so people don't omit "OpenMode".
2021-05-12 11:00:45 +01:00
Andreas Kling
b91c49364d AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to
create a NonnullOwnPtr from the result of a naked new.)
2021-04-23 16:46:57 +02:00
Linus Groh
ebdeed087c Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
73aa59ccf1 Network.Applet: Avoid JsonObject copy and use StringBuilder::appendff() 2021-04-17 01:27:29 +02:00
Nicholas-Baron
73dd293ec4 Everywhere: Add -Wdouble-promotion warning
This warning informs of float-to-double conversions. The best solution
seems to be to do math *either* in 32-bit *or* in 64-bit, and only to
cross over when absolutely necessary.
2021-04-16 19:01:54 +02:00
Andreas Kling
ff312d8aa6 Applets: Remove unused UserName applet 2021-04-15 20:38:12 +02:00
thankyouverycool
08f11d01d9 FontEditor+ClipboardHistory: Use system-wide Clipboard
Glyphs can now be copied between editors.
2021-04-07 19:27:01 +02:00
Dawid Wolosowicz
1f65c2a981 Network: Make the applet use an alpha channel 2021-04-05 14:30:35 +02:00
Dawid Wolosowicz
3f73816316 ClipboardHistory: Make the applet use an alpha channel 2021-04-05 14:30:35 +02:00
Andreas Kling
436a1dce34 ResourceGraph.Applet: Host both CPU and memory applet in one process
No reason we can't host these in the same process, and then we have
one less process to dynamically link at boot. :^)
2021-04-04 20:13:55 +02:00
Andreas Kling
0069020e6c WindowServer+LibGUI: Rename WindowType::MenuApplet => Applet 2021-04-04 17:55:50 +02:00
Andreas Kling
23cc88f83b Userland: Rename *.MenuApplet => *.Applet
These are no longer displayed in the menu, so it doesn't make sense to
call them menu applets. :^)
2021-04-04 16:29:55 +02:00