Commit graph

5793 commits

Author SHA1 Message Date
Andreas Kling
ef658594e4 LibIPC: Let's start building custom message codecs for LibIPC
Instead of using ByteBuffer (which always malloc() their storage) for
IPC message encoding, we now use a Vector<u8, 1024>, which means that
messages smaller than 1 KB avoid heap allocation entirely.
2019-12-30 02:41:45 +01:00
Andreas Kling
00d26457c5 WindowServer: Don't repaint entire menubar on applet update 2019-12-30 01:18:38 +01:00
Andreas Kling
8fd7f3d9fa Ports: Update GCC patch to match our toolchain 2019-12-30 00:36:37 +01:00
Andreas Kling
57f55f297b LibGUI: Call GWidget::resize_event() before doing widget layout
The widget layout system currently works by having layouts size the
children of a widgets. The children then get resize events, giving them
a chance to lay out their own children, etc.

In keeping with this, we need to handle the resize event before calling
do_layout() in a widget, since the resize event handler may do things
that end up affecting the layout, but layout should not affect the
resize event since the event comes from the widget parent, not itself.
2019-12-30 00:26:19 +01:00
Andreas Kling
aaaf04f393 LibGUI: Relayout GTextEditor on font change
Fixes #941.
2019-12-29 23:03:41 +01:00
Andrew Kaster
cdcab7e5f4 Kernel: Retry mmap if MAP_FIXED is not in flags and addr is not 0
If an mmap fails to allocate a region, but the addr passed in was
non-zero, non-fixed mmaps should attempt to allocate at any available
virtual address.
2019-12-29 23:01:27 +01:00
Andrew Kaster
bae8e21a8b Kernel: Add move assign operator to KResultOr 2019-12-29 23:01:27 +01:00
Andreas Kling
821484f170 AK: Fix JSON parser crashing when encountering UTF-8
The mechanism that caches the most recently seen string for each first
character was indexing into the cache using a 'char' subscript. Oops!
2019-12-29 22:20:21 +01:00
Shannon Booth
d1d7db2745 WindowServer: Include minimised windows for switching 2019-12-29 22:07:46 +01:00
Shannon Booth
24bc674d94 AK: Add StringView::ends_with function 2019-12-29 22:04:22 +01:00
Andreas Kling
27df4eb43d WindowServer: Always fill the menubar with color behind applets
Otherwise, menu applets with an alpha channel may leave behind ghost
pixels when updating.

Fixes #949.
2019-12-29 21:18:38 +01:00
Andreas Kling
8721d54f24 Clock.MenuApplet: Only wake up once per second
This avoids an issue where we'd sometimes go longer than a whole second
between updates. Thanks to Roman May for the suggestion! :^)
2019-12-29 21:18:07 +01:00
Andreas Kling
fed3416bd2 Kernel: Embrace the SerenityOS name 2019-12-29 19:08:02 +01:00
Andreas Kling
6a94214502 About: Embrace the SerenityOS name 2019-12-29 19:07:52 +01:00
Andreas Kling
2de19342e7 Meta: Fix typo in ReadMe 2019-12-29 16:25:06 +01:00
Andreas Kling
fd14795f9d Meta: Update ReadMe and move build instructions to a separate document 2019-12-29 16:23:50 +01:00
Andreas Kling
411d293961 LibCore+LibGUI: Don't fire timers in non-visible windows by default
LibCore timers now have a TimerShouldFireWhenNotVisible flag which is
set to "No" by default.

If "No", the timer will not be fired by the event loop if it's within
a CObject tree whose nearest GWindow ancestor is currently not visible
for timer purposes. (Specificially, this means that the window is
either minimized or fully occluded, and so does not want to fire timers
just to update the UI.)

This is another nice step towards a calm and serene operating system.
2019-12-29 16:03:36 +01:00
Andreas Kling
f8f2b8b520 LibDraw: Fix text rendering in progress bars 2019-12-29 15:53:28 +01:00
Andreas Kling
e0ec4f89b2 Base: Add man page for purge(8) 2019-12-29 13:23:21 +01:00
Andreas Kling
1f31156173 Kernel: Add a mode flag to sys$purge and allow purging clean inodes 2019-12-29 13:16:53 +01:00
Andreas Kling
c74cde918a Kernel+SystemMonitor: Expose amount of per-process clean inode memory
This is memory that's loaded from an inode (file) but not modified in
memory, so still identical to what's on disk. This kind of memory can
be freed and reloaded transparently from disk if needed.
2019-12-29 12:45:58 +01:00
Andreas Kling
0d5e0e4cad Kernel+SystemMonitor: Expose amount of per-process dirty private memory
Dirty private memory is all memory in non-inode-backed mappings that's
process-private, meaning it's not shared with any other process.

This patch exposes that number via SystemMonitor, giving us an idea of
how much memory each process is responsible for all on its own.
2019-12-29 12:28:32 +01:00
Andreas Kling
ffbe975ffc LibHTML: RenderingContext should keep the Palette alive
We were lugging around a reference to a temporary here.
2019-12-29 12:01:24 +01:00
Stefano Cristiano
985d906189 Build: Add instructions on where to get flock on macOS
Commit 0b50133 makes use of flock command inside makefiles.
Unfortunately it's not a core macOS command, so it must be installed explicitly using brew.
2019-12-29 01:08:37 +01:00
Andreas Kling
7b2dd7e116 LibDraw+LibGUI: Allow changing individual colors in a Palette
Palette is now a value wrapper around a NonnullRefPtr<PaletteImpl>.
A new function, set_color(ColorRole, Color) implements a simple
copy-on-write mechanism so that we're sharing the PaletteImpl in the
common case, but allowing you to create custom palettes if you like,
by getting a GWidget's palette, modifying it, and then assigning the
modified palette to the widget via GWidget::set_palette().

Use this to make PaintBrush show its palette colors once again.

Fixes #943.
2019-12-29 00:47:49 +01:00
Andreas Kling
19d4f4c7b5 LibHTML: Add missing flock to Makefile (thanks jcs) 2019-12-28 23:58:52 +01:00
Conrad Pankoff
f5412f10cf HackStudio: Check for make command on startup 2019-12-28 23:53:09 +01:00
Stefano Cristiano
fa8cec6627 Build: Fix missing IPC dependency for LibHTML 2019-12-28 21:43:56 +01:00
Andreas Kling
80556e6111 AK: Unbreak Tests Makefile. Turns out this newline was effectful :^) 2019-12-28 21:41:32 +01:00
joshua stein
b916aa3b5a Build: go back to ordering SUBDIRS by their usefulness
The dependency tracking still doesn't need any specific ordering to
build, but it's better to build DevTools and Libraries first so it
doesn't try to build two Applications that each need to wait for
libraries to be built, wasting a make child sitting around trying to
acquire the lock on the library directory.
2019-12-28 21:09:33 +01:00
joshua stein
b624eaaf78 Build: consider IPCCOMPILER and FORMCOMPILER just for ordering
Build them if they don't exist, but don't care about them being
newer or older than the target.

I believe this is what was causing build loops where IPCCompiler was
being run a second time, rebuilding its .h file, then a library
would depend on that .h file and get re-archived, then an
application would need relinking, and something in that whole
process would trigger IPCCompiler running again touching its .h
file.
2019-12-28 21:09:33 +01:00
joshua stein
0b501335f5 Build: wrap make invocations with flock(1)
Lock each directory before entering it so when using -j, the same
dependency isn't built more than once at a time.

This doesn't get full -j parallelism though, since one make child
will be sitting idle waiting for flock to receive its lock and
continue making (which should then do nothing since it will have
been built already).  Unfortunately there's not much that can be
done to fix that since it can't proceed until its dependency is
built by another make process.
2019-12-28 21:09:33 +01:00
joshua stein
d622e4d224 Build: build Userland binaries separately
Touching one source file shouldn't require relinking all binaries,
consider each one separate.  Also fix building library dependencies.
2019-12-28 21:09:33 +01:00
joshua stein
2d7259e0a0 Build: Put C and M at the front of $LIB_DEPS to build first 2019-12-28 21:09:33 +01:00
Stefano Cristiano
68d721f973 Toolchain: Fix building binutils on macOS with --enable-shared 2019-12-28 21:08:04 +01:00
Tibor Nagy
ac0b8caa42 Base: Add 2x upscaled Liza fonts 2019-12-28 21:06:02 +01:00
Conrad Pankoff
fe1037bcb6 HackStudio: Add file list context menu and file removal action 2019-12-28 21:04:29 +01:00
Conrad Pankoff
bbb536ebed Kernel: Fix code locked behind NETWORK_TASK_DEBUG 2019-12-28 02:03:49 +01:00
Conrad Pankoff
5ca7ae4585 Kernel: Route all loopback traffic through the loopback adapter 2019-12-28 02:03:38 +01:00
Conrad Pankoff
04cbdb2e6f MenuApplets: Add gitignore for clock applet 2019-12-28 00:24:56 +01:00
Conrad Pankoff
876323fd7a Kernel: Move incoming packet buffer off the NetworkTask stack 2019-12-28 00:24:43 +01:00
Paweł Cholewa
b5c3bc6a71 LibC: implement fgetpos and fsetpos
They're just "front ends" for ftell and fseek, but they do their
job.

Fixes #913
2019-12-27 23:09:08 +01:00
Andreas Kling
2cbc3c6ee5 LibC+ping: Let's use the traditional timersub() et al prototypes
This also fixes the build, since ping.cpp already had a timersub().
2019-12-27 23:07:28 +01:00
Hüseyin ASLITÜRK
71922ee6a5 GListView: Fix for theme support. We have to use theme colors. 2019-12-27 22:47:31 +01:00
Hüseyin ASLITÜRK
e50deb55d3 WindowServer: Remove Clock from server.
We have clock applet.
2019-12-27 22:47:31 +01:00
Hüseyin ASLITÜRK
3d4dddd111 MenuApplets: Add Clock applet, move code from WindowServer to the applet. 2019-12-27 22:47:31 +01:00
Mauri de Souza Nunes
0e49c842de LibC: Add timeval operations
This commit add macros for the timeval operations timeradd, timersub,
timercmp, timerisset, timerclear.
2019-12-27 22:43:43 +01:00
Andreas Kling
4d997308c2 LibC: Remove some functions we had two of 2019-12-27 16:55:10 +01:00
Andreas Kling
cbdd65e4d9 LibDraw: Remove redundant Rect copy constructor 2019-12-27 16:55:10 +01:00
Andreas Kling
4a0fb34eb8 Toolchain: Allow building shared objects
Here goes a small first step towards dynamic linking.
2019-12-27 16:55:10 +01:00