Commit graph

1181 commits

Author SHA1 Message Date
Andreas Kling
0f15093e96 LizaRegular8x10: Tweak some glyphs. 2019-02-05 11:53:06 +01:00
Andreas Kling
38f589a9cb SharedGraphics: Add some useful painting helpers and make use of them. 2019-02-05 11:42:58 +01:00
Andreas Kling
b782055b96 Kernel: Add an InterruptFlagSaver helper class.
This is useful instead of InterruptDisabler in some cases.
2019-02-05 11:14:09 +01:00
Andreas Kling
cd1bbdf052 WindowServer: Make the window close button look a bit nicer. 2019-02-05 11:05:24 +01:00
Andreas Kling
11db8c1697 Add a simple close button ("X") to windows.
Clicking the button generates a WindowCloseRequest event which the client app
then has to deal with. The default behavior for GWindow is to close() itself.

I also added a flag, GWindow::should_exit_event_loop_on_close() which does
what it sounds like it does.

This patch exposed some bugs in GWindow and GWidget teardown.
2019-02-05 10:31:37 +01:00
Andreas Kling
d0078b6574 Clock: Turns the clock window from guitest2 into a separate program.
We can't not have a desktop clock app. :^)
2019-02-05 09:44:13 +01:00
Andreas Kling
41567c5bb9 Show the amount of memory in GraphicsBitmaps in /bin/top.
This seems like an extremely relevant metric to track.
2019-02-05 09:27:27 +01:00
Andreas Kling
b1e054ffe8 Rename LizaBold to LizaRegular and LizaBlack to LizaBold.
LizaRegular is quickly becoming my favorite bitmap font. It's so pretty :^)
2019-02-05 09:08:25 +01:00
Andreas Kling
0c38a4c30f WindowServer: Sever the WSWindow/Process link when the process dies.
This fixes a deadlock where the WindowServer would get stuck trying to
acquire a dead process's event stream lock.
2019-02-05 08:32:32 +01:00
Andreas Kling
ca16d9d98e Kernel: Invalidate file-backed VMO's when inodes are written.
The current strategy is simply to nuke all physical pages and force
reload them from disk. This is obviously not optimal and should eventually
be optimized. It should be fairly straightforward.
2019-02-05 08:17:46 +01:00
Andreas Kling
af21a45b1a FontEditor: Allow specifying which font to edit on the command line.
Also add a quit button. The quit button has a tendency to freeze the kernel.
That doesn't seem entirely right.
2019-02-05 07:23:01 +01:00
Andreas Kling
d459525725 AK: Vector::data() shouldn't crash if the vector is empty.
It's up to the caller to check size() and stay within the bounds.
2019-02-05 07:12:45 +01:00
Andreas Kling
a32b33621f LizaBlack8x10: Tweak some glyphs. 2019-02-05 07:12:25 +01:00
Andreas Kling
a258d6507a mmap all the font files!
Font now uses the same in-memory format as the font files we have on disk.
This allows us to simply mmap() the font files and not use any additional
memory for them. Very cool! :^)

Hacking on this exposed a bug in file-backed VMObjects where the first client
to instantiate a VMObject for a specific inode also got to decide its size.
Since file-backed VMObjects always have the same size as the underlying file,
this made no sense, so I removed the ability to even set a size in that case.
2019-02-05 06:43:33 +01:00
Andreas Kling
612c02307e AK: Add bounds assertions in Vector::operator[].
I was sure I had this already.
2019-02-05 06:37:03 +01:00
Andreas Kling
c77f32d2f0 LizaBlack8x10: Import a very heavy variant of Liza. 2019-02-04 16:02:30 +01:00
Andreas Kling
d4aaba6bed FontEditor: Minor UI improvements.
- Implement focus for custom widgets.
- Add two live demo labels with an English pangram in upper/lower case.
2019-02-04 15:38:03 +01:00
Andreas Kling
d7307c3119 Kernel: Ignore SIGCHLD by default.
Also use an enum for the rather-confusing return value in dispatch_signal().
I will go through the rest of the signals and set them up with the
appropriate default dispositions at some other point.
2019-02-04 14:06:38 +01:00
Andreas Kling
ba6ffea03c Kernel: Process should send SIGCHLD to its parent when it dies. 2019-02-04 13:30:03 +01:00
Andreas Kling
7fe600f250 LibGUI: Use LightGray as the base UI color.
This feels nicely reminiscent of the gap in time between Win3.11 and Win95,
one of my favorite eras in UI look-and-feel.
2019-02-04 11:53:26 +01:00
Andreas Kling
6f787f6877 LibGUI: Use LizaBold as the default button font. 2019-02-04 11:41:01 +01:00
Andreas Kling
cacba45f1c LizaBold8x10: Import a bold variant of Liza8x10 and make it the default bold.
Start using it right away for window titles.
2019-02-04 11:37:15 +01:00
Andreas Kling
ac11c90dee ProcFS: Fix wrong linkage for /proc/cpuinfo inode. 2019-02-04 10:38:54 +01:00
Andreas Kling
bc6ff35428 LibGUI: GTextBox should only run a caret blink timer when focused. 2019-02-04 10:34:56 +01:00
Andreas Kling
c0cffe1134 Add a /bin/top program for process table monitoring.
It automagically computes %CPU usage based on the number of times a process
has been scheduled between samples. The colonel task is used as idle timer.
This is pretty cool. :^)
2019-02-04 10:28:12 +01:00
Andreas Kling
642e2447c9 Terminal: Fix broken parsing of background color escape. 2019-02-04 10:22:47 +01:00
Andreas Kling
356abbb7ee Kernel: Process should disassociate from its TTY when it dies.
Just because we die doesn't mean we got waited on yet, so keeping around
a dangling TTY pointer is just asking for trouble.
2019-02-04 10:21:15 +01:00
Andreas Kling
9126d08a43 Terminal: Avoid dirtying lines when clearing them has no visual effect. 2019-02-04 08:53:53 +01:00
Andreas Kling
e88c8eae6a AK: Fix leak in HashTable move assignment operator. 2019-02-04 08:53:12 +01:00
Andreas Kling
b51031bb54 Kernel: Add a /proc/all process table dump.
This will be useful for implementing some process-related utilities.
2019-02-03 18:53:18 +01:00
Andreas Kling
dddd0e7b03 Get nyancat nyanning in Serenity.
I found a cute program that renders an animated nyancat in the terminal.
This patch adds enough hackery to get it working correctly. :^)
2019-02-03 16:11:28 +01:00
Andreas Kling
3944c00f23 Terminal: Add limited support for 'M' escape sequence (delete line.) 2019-02-03 14:00:48 +01:00
Andreas Kling
31f44481f3 Add /dev/{stdin,stdout,stderr} as symlinks to /proc/self/fd/{0,1,2}
Also change /bin/cat to open /dev/stdin if no arguments are provided.
2019-02-03 12:38:03 +01:00
Andreas Kling
5e9ba2ac84 Kernel: Rewrite ProcFS.
Now the filesystem is generated on-the-fly instead of manually adding and
removing inodes as processes spawn and die.

The code is convoluted and bloated as I wrote it while sleepless. However,
it's still vastly better than the old ProcFS, so I'm committing it.

I also added /proc/PID/fd/N symlinks for each of a process's open fd's.
2019-02-03 12:33:11 +01:00
Andreas Kling
ab56f36bfb LibC: strdup() forgot to allocate space for the null character. 2019-02-03 11:49:23 +01:00
Andreas Kling
9da9cce4f7 SharedGraphics: Font::load_from_file() forgot to close() the font file. 2019-02-03 08:18:16 +01:00
Andreas Kling
1fffc0ae60 Kernel: stat(), fstat() and lstat() didn't return some error codes. 2019-02-03 06:27:16 +01:00
Andreas Kling
0c9a2b1430 Kernel: Oops, I mixed up st_dev and st_rdev in struct stat. 2019-02-03 06:23:10 +01:00
Andreas Kling
e895d6c48e Kernel: Add /proc/self, a symlink to the /proc/$PID.
This will be useful for implementing things like /dev/stdin.
2019-02-03 04:54:52 +01:00
Andreas Kling
c2adfd0e2d LibC: Implement various things to get GNU bc building and running.
Looks like that's all we needed, and bc now runs. :^)
2019-02-03 04:32:31 +01:00
Andreas Kling
3a9c01619f Ext2FS: Avoid a kmallocation every time we fetch an inode from disk. 2019-02-03 04:05:30 +01:00
Andreas Kling
db2422d0d3 Terminal: Constrain the cursor inside the terminal rect. 2019-02-03 04:04:42 +01:00
Andreas Kling
333aa1646c Kernel: Increase default userspace stack size to 64 kilobytes. 2019-02-03 03:56:08 +01:00
Andreas Kling
2a093ada33 WindowServer: Add some stripes to the window titles.
I like the look of this right now. Maybe later I'll feel differently.
2019-02-03 03:38:44 +01:00
Andreas Kling
3198639730 SharedGraphics: Add missing clipping in draw_line(). 2019-02-03 03:37:55 +01:00
Andreas Kling
dd931f136e guitest2: Stop showing the font test window by default. 2019-02-03 03:36:10 +01:00
Andreas Kling
663aad4036 FontEditor: Add text box for editing the font name. 2019-02-03 03:06:58 +01:00
Andreas Kling
5877feab1b Liza8x10: Tweak some glyphs. 2019-02-03 03:06:43 +01:00
Andreas Kling
2d17fe58bc Kernel: Remove unnecessary assertion in page_in_from_inode().
Turns out I had confused myself about the situation. Just because a page
has been paged in by another process doesn't mean that the *current*
process's page directory has the present bit set! D'oh. :^)
2019-02-03 03:04:40 +01:00
Andreas Kling
3eeff0dd14 Kernel: Improve crash info if page_in_from_inode() is called redundantly. 2019-02-03 02:49:59 +01:00