Commit Graph

2412 Commits

Author SHA1 Message Date
Andreas Kling
ad1c3c748f Shell: Allow browsing history with up/down arrow keys. 2019-05-07 02:50:15 +02:00
Andreas Kling
16a5a76445 Shell: Add "history" command that shows command history. 2019-05-07 01:43:21 +02:00
Andreas Kling
ba7364b43b Shell: Move line editing to a separate class.
To be clear, there isn't really any line editing yet. But there is
going to be, so let's have it in its own class.
2019-05-07 01:39:41 +02:00
Andreas Kling
fe73543d41 Shell: Move the Shell to a separate directory and let's call it "Shell" :^) 2019-05-07 01:12:08 +02:00
Andreas Kling
e63cc38861 Shell: Use a Vector<char> for the main input buffer. 2019-05-07 01:01:50 +02:00
Andreas Kling
e66f88ed60 GTableView: Make column resizing work when view is scrolled horizontally. 2019-05-06 23:38:35 +02:00
Andreas Kling
26110f7753 GTextEditor: set_cursor() should gracefully handle old cursor being invalid.
Since set_cursor() may be called after arbitrary document changes, it can't
rely on the old cursor being valid. To make things simple, if the old cursor
is on a line no longer in the document, just repaint the whole editor.
2019-05-06 22:04:53 +02:00
Andreas Kling
72cbcd8e98 Kernel: Dump backtrace on exit() syscall.
This makes assertion failures a lot more pleasant to investigate.
2019-05-06 21:48:48 +02:00
Andreas Kling
cb3e150983 GraphicsBitmap: Add non-const overload of bits().
This is clearly useful, I don't know why I thought it wasn't.
2019-05-06 20:29:52 +02:00
Andreas Kling
61e3ecec79 GraphicsBitmap: Add a new "Indexed8" format that uses a 256-entry palette.
These bitmaps should only be used as a source bitmap, we won't support
painting into them using Painter. You can however manipulate the raw
pixel data. :^)
2019-05-06 19:32:56 +02:00
Andreas Kling
cec16105cc Make sure all GraphicsBitmap scanlines are 16-byte aligned.
This is a prerequisite for some optimizations.
2019-05-06 14:04:54 +02:00
Andreas Kling
fafdda8902 AK: Change HashTable and HashMap size/capacity to be ints. 2019-05-06 13:28:52 +02:00
Andreas Kling
ac67a2ed5e Minesweeper: Flag unflagged mines on win. 2019-05-06 13:27:58 +02:00
Andreas Kling
3d61c8ec09 ProcessManager: Use the same margins for both CPU and memory graph. 2019-05-06 03:37:22 +02:00
Andreas Kling
25bb7a59ac ProcessManager: Add CPU/memory usage graphs in a separate tab.
Finally we get some real use for the new GTabWidget. :^)
2019-05-06 03:21:34 +02:00
Andreas Kling
6df3df62be Color: Add named color "Cyan" 2019-05-06 00:59:33 +02:00
Andreas Kling
3bdb95e128 ProcessManager+LibGUI: Tweak things to improve ProcessManager look. 2019-05-05 20:53:04 +02:00
Andreas Kling
9e5ad25188 GTabWidget: Paint a frame around the container part of the widget.
Then make the active tab stand out by punching a hole in the frame below
its button.
2019-05-05 15:03:34 +02:00
Andreas Kling
4e1b36ddf2 GTabWidget: Make a custom look for tab buttons. 2019-05-05 14:39:37 +02:00
Andreas Kling
62e7b26406 LibGUI: Start working on a tabbed widget container: GTabWidget. 2019-05-05 01:31:02 +02:00
Andreas Kling
dd299fe51a CObject: add_child() should set the child's parent. 2019-05-05 01:09:49 +02:00
Andreas Kling
b7cd6dea13 GTableView: Fix crash when clicking at random places. 2019-05-05 00:58:42 +02:00
Andreas Kling
dc919352b0 WindowServer: Don't send Paint messages to minimized windows.
There's no point in painting if it can't be seen anyway. We also make sure
to request a repaint when un-minimizing, so the window gets a chance to
repaint itself then.
2019-05-04 23:59:04 +02:00
Andreas Kling
48e3ea9e5c GTableView: Make it possible to resize the columns with the mouse.
The GModel now merely provides an initial width for the columns. Once that
has been queried, the table view manages width from then on.
2019-05-04 23:45:31 +02:00
Andreas Kling
f3aec1a0d9 Painter: Re-enable diagonal draw_line().
This code still needs clipping, but the basic concept works. It was disabled
since before the kernel had floating point support.
2019-05-04 23:40:52 +02:00
Andreas Kling
a8c856ed3d GTableView: Improve look of column headers, and add sort order indicators. 2019-05-04 21:16:41 +02:00
Andreas Kling
6228503c16 Kernel: Add a bit of logging in VMObject::inode_size_changed(). 2019-05-04 21:15:59 +02:00
Andreas Kling
932836e3c7 Kernel: Computing the boot timestamp was a bit broken. 2019-05-04 17:05:42 +02:00
Andreas Kling
3ae75e04ec date: Add "-u" argument for printing current Unix timestamp. 2019-05-04 16:50:36 +02:00
Andreas Kling
5e938868a2 IPv4: Rename source/destination in socket classes to local/peer.
It was way too ambiguous who's the source and who's the destination, and it
didn't really follow a logical pattern. "Local port" vs "Peer port" is super
obvious, so let's call it that.
2019-05-04 16:40:34 +02:00
Andreas Kling
780d2a08c4 IPv4: Save the source address/port together with incoming packet payloads.
We need the address/port to fill in the out-params in recvfrom().
It should now be more or less possible to create a UDP server. :^)
2019-05-04 03:27:50 +02:00
Andreas Kling
c4bb9a3ccb sync.sh: Add "-f" option to forcibly regenerate _fs_contents from scratch.
This might be useful e.g if something goes wrong with the filesystem.
2019-05-04 02:56:21 +02:00
Andreas Kling
f137881147 run: Make it easy to override which qemu executable is used.
Patch contributed by "pd"
2019-05-04 02:52:51 +02:00
Andreas Kling
7aba0058ae sync.sh: Don't regenerate _fs_contents from /dev/zero every time.
This makes sync.sh run a lot faster, especially on slower machines.

Patch contributed by "pd"
2019-05-04 02:50:10 +02:00
Andreas Kling
8b249bd09b Kernel+Userland: Implement mknod() syscall and add a /bin/mknod program. 2019-05-03 22:59:58 +02:00
Andreas Kling
abb5c890e0 IPv4: Implement bind() for TCP and UDP sockets.
We can't accept connections just yet, but this patch makes it possible to
bind() to a given source address/port.
2019-05-03 21:51:40 +02:00
Andreas Kling
6a5d92f0ad WindowServer+LibGUI: Allow changing whether windows have alpha channels.
Use this in Terminal to tell the window server to not bother with the alpha
channel in the backing store if we're running without transparency.
Semi-transparent terminals look neat but they slow everything down, so this
keeps things fast while making it easy to switch to the flashy mode. :^)
2019-05-03 21:07:16 +02:00
Andreas Kling
2470fdcd9b Kernel: Make Socket inherit from File. 2019-05-03 20:42:43 +02:00
Andreas Kling
03da7046bd Kernel: Prepare Socket for becoming a File.
Make the Socket functions take a FileDescriptor& rather than a socket role
throughout the code. Also change threads to block on a FileDescriptor,
rather than either an fd index or a Socket.
2019-05-03 20:15:54 +02:00
Andreas Kling
9f633a1871 LibC: Add strcoll() and strxfrm().
These are obviously not locale-aware implementations, but rather really just
strcmp() and strcpy() with different names. This makes vim build and run :^)
2019-05-03 18:17:33 +02:00
Andreas Kling
052be28c3b LibM: Stub out a whole bunch of math functions so vim will build. 2019-05-03 18:17:02 +02:00
Andreas Kling
c46f1cbbc2 Meta: Add IRC channel to the ReadMe.
Bonus points to anyone who joins using the Serenity IRCClient. ;^)
2019-05-03 16:25:15 +02:00
Andreas Kling
ea9a39a9f2 LibGUI+WindowServer: Add a GResizeCorner widget.
This widget is automatically included in GStatusBar, but can be added in
any other place, too. When clicked (with the left button), it initiates a
window resize (using a WM request.)

In this patch I also fixed up some issues with override cursors being
cleared after the WindowServer finishes a drag or resize.
2019-05-03 01:38:24 +02:00
Andreas Kling
34c5db61aa Kernel: Simplify VMObject::is_anonymous().
This doesn't need a separate flag. A VMObject is always anonymous if it has
no backing inode.
2019-05-02 23:34:28 +02:00
Andreas Kling
b8e60b6652 Kernel: Remove unused Region::is_bitmap(). 2019-05-02 23:31:11 +02:00
Andreas Kling
66e401d668 LibC: Tune the number of ChunkedBlocks we keep around empty.
At the moment, both mmap() and munmap() are kind of slow. Compiling with GCC
was suffering quite badly from munmap() slowness, so let's keep a few more
of the ChunkedBlocks around after they are empty, to avoid having to munmap.
2019-05-02 18:11:36 +02:00
Andreas Kling
b4e7925e31 LibC: Move full ChunkedBlocks to a separate list in the allocator.
This way we only check actually usable blocks when trying to satisfy a new
allocation request.
2019-05-02 17:06:05 +02:00
Andreas Kling
60023ff70b LibC: free() should move kept empty ChunkedBlocks to the end of the list.
This ensures that we continue allocating from partially-used blocks until
they are full.
2019-05-02 16:35:57 +02:00
Andreas Kling
658fff195c LibC: free() should return free blocks back to the operating system.
Okay fine, I'll give them back. But we'll keep 4 blocks per size class on
hand, to reduce churn.
2019-05-02 15:58:10 +02:00
Andreas Kling
2a65f0ee4f strace: Allow "strace command" to trace a process from start to finish.
Tracing a specific pid is now done via "strace -p PID".
To ensure we don't miss any syscalls, we fork and have the child immediately
SIGSTOP itself. Then when the parent has set up the systrace() fd, we send
SIGCONT to the child which then execs the command. :^)
2019-05-02 15:51:39 +02:00