Commit graph

1108 commits

Author SHA1 Message Date
Andreas Kling
4b15dd2bca LibGUI: Rename GEventLoop::exit() and GApplication::exit() to quit().
These functions don't exit immediately, but rather on the next iteration
of the event loop.

Since exit() is already used by the standard library, let's call it quit()
instead. That way, saying exit() means the same thing here as anywhere else.
2019-02-17 09:59:56 +01:00
Andreas Kling
fa13e1977e Meta: Add some quick instructions for how to build and run this thing. 2019-02-17 09:45:39 +01:00
Andreas Kling
c81b217fa7 SharedGraphics: Assign a human-friendly name for mmapped GraphicsBitmap. 2019-02-17 09:41:26 +01:00
Andreas Kling
df2d46d5dc Kernel: Add SocketRole::Listener and report the role nicely in /proc/PID/fds. 2019-02-17 09:40:52 +01:00
Andreas Kling
a0b55987d3 Kernel: Report the correct name for NullDevice. 2019-02-17 09:40:19 +01:00
Andreas Kling
fa452fadca WindowServer: Let menu objects reference the WSClientConnection by pointer.
Since these are owner/ownee relationships, there's no need for indirection.
2019-02-17 09:07:07 +01:00
Andreas Kling
459cc23441 Kernel: Remove Process::gui_client_id(). 2019-02-17 09:05:49 +01:00
Andreas Kling
f02a490230 WindowServer: Get rid of unnecessary messaging indirection. 2019-02-17 08:58:42 +01:00
Andreas Kling
9a39c01551 WindowServer: WSWindow can have a pointer to the client rather than an ID.
Since WSWindows are owned by WSConnectionClients, it's fine for them to just
reference the client directly.
2019-02-17 08:54:57 +01:00
Andreas Kling
1056a39bd6 WindowServer: Remove some debug spam. 2019-02-17 08:43:49 +01:00
Andreas Kling
bd2fdcbbaa Kernel: Rename BochsVGADevice to BXVGADevice. 2019-02-17 08:41:05 +01:00
Andreas Kling
10b43f3d1d Kernel: Rename Keyboard to KeyboardDevice. 2019-02-17 08:39:09 +01:00
Andreas Kling
2dc0ef8813 Kernel: munmap() should round up to nearest page size, just like mmap().
The mismatch between the two was causing some trouble if you'd mmap e.g 1KB
and then try to munmap() it. The kernel would whine that it couldn't find
any such mapping (because mmap() actually rounded the 1KB to a 4KB page.)
2019-02-17 08:33:13 +01:00
Andreas Kling
82768e7ac5 WindowServer: Move video mode setup to WSScreen. 2019-02-17 01:43:01 +01:00
Andreas Kling
809266a9fb Kernel: Remove tracking of bitmap memory.
There are no more kernel bitmaps. It's much better this way.
2019-02-17 01:16:38 +01:00
Andreas Kling
cc9ff96a98 Kernel: FileDescriptor::absolute_path() should "support" sockets. 2019-02-17 01:11:37 +01:00
Andreas Kling
3eb6c22a22 WindowServer: Make the menubar clock work again in the post-kernel world.
This is actually so much better. Grabbing directly at the RTC was silly. :^)
2019-02-17 01:05:53 +01:00
Andreas Kling
18062f4ad6 LibGUI: Remove some debugging noise. 2019-02-17 01:05:24 +01:00
Andreas Kling
9b2b9fe39b SharedGraphics: Fix #ifdef mismatch in Painter.
This mistake created an incredible amount of confusion. We would allocate
a slightly too small Painter on the stack and then invoke its constructor,
overwriting whatever came after it on the stack.
2019-02-17 00:52:17 +01:00
Andreas Kling
10d6f9ce31 SharedGraphics: Removed some unused stuff from Font. 2019-02-17 00:36:55 +01:00
Andreas Kling
53c69dbade Start the WindowServer process with high priority. 2019-02-17 00:21:26 +01:00
Andreas Kling
640360e958 Move WindowServer to userspace.
This is a monster patch that required changing a whole bunch of things.
There are performance and stability issues all over the place, but it works.
Pretty cool, I have to admit :^)
2019-02-17 00:13:47 +01:00
Andreas Kling
0b1b21d622 LibC: mmap() should not interpret high addresses as errors, oops! 2019-02-16 15:34:31 +01:00
Andreas Kling
c3d36a5fe9 WindowServer: Prune more kernel-related gunk. 2019-02-16 12:25:47 +01:00
Andreas Kling
09aaa41e62 SharedGraphics: Rework GraphicsBitmap::create_kernel_only() into create().
And just use mmap() to allocate the pixels.
2019-02-16 12:22:52 +01:00
Andreas Kling
4ea28bf0a5 Kernel: Add a simple shared memory API for two processes only.
And use this to implement shared bitmaps between WindowServer and clients.
2019-02-16 12:13:43 +01:00
Andreas Kling
4db78dabd3 Kernel: Rename create_framebuffer_wrapper() to create_for_physical_range().
Maybe there will be other types of physical ranges to map in the future.
This API doesn't seem at all specific to framebuffers.
Also tidy up a bit in BochsVGADevice.
2019-02-16 10:58:15 +01:00
Andreas Kling
7210d2ade5 Kernel: Remove knowledge about BochsVGADevice from Process. 2019-02-16 10:40:47 +01:00
Andreas Kling
468113422f Kernel: Add ioctls to BochsVGADevice for mode setting and page flipping.
Use these in WindowServer instead of poking at the BochsVGADevice directly.
2019-02-16 10:26:01 +01:00
Andreas Kling
799177feda Kernel: Make BochsVGADevice a BlockDevice and support mmapping it.
Currently you can only mmap the entire framebuffer.
Using this when starting up the WindowServer gets us yet another step
closer towards it moving into userspace. :^)
2019-02-16 09:57:42 +01:00
Andreas Kling
2dc7c5a7b0 Kernel: Add empty BlockDevice class. 2019-02-16 00:52:58 +01:00
Andreas Kling
994279d56c Kernel: Add Device base class for CharacterDevice.
..to prepare for adding a BlockDevice class.
2019-02-16 00:47:20 +01:00
Andreas Kling
c6ca6522fc Kernel: Sending a signal to another process needs to disable interrupts. 2019-02-15 23:45:01 +01:00
Andreas Kling
749db8237c Ext2FS: Fix various bugs in inode and block allocation.
I had the wrong idea about how group indices work, so using a larger fs
with more than one group caused all kinds of mess.
2019-02-15 23:28:20 +01:00
Andreas Kling
cbfd416279 LibC: The standard C library needs to be able to build as pure C.
Looks like we can't use those comfy C++ attributes in this code then.
2019-02-15 22:37:20 +01:00
Andreas Kling
3b42db0b4c LibC: Fix busted realloc() implementation. 2019-02-15 22:36:59 +01:00
Andreas Kling
df6aaaeeef Enable -Wimplicit-fallthrough. 2019-02-15 12:39:16 +01:00
Andreas Kling
56f0a30f9b LibC: Actually, malloc() can return null so don't lie about that. 2019-02-15 12:38:49 +01:00
Andreas Kling
022f7790db Use modern C++ attributes instead of __attribute__ voodoo.
This is quite nice, although I wish [[gnu::always_inline]] implied inline.
Also "gnu::" is kind of a wart, but whatcha gonna do.
2019-02-15 12:30:48 +01:00
Andreas Kling
fbcc8ab840 WindowServer: Slurp all available client messages when checking them.
We were reading one client message per client per event loop iteration.
That was not very snappy. Make the sockets non-blocking and read() until
there are no messages left.

It would be even better to make as few calls to read() as possible to
reduce context switching, but this is already a huge improvement.
2019-02-15 11:43:43 +01:00
Andreas Kling
29c49356e3 WindowServer: Rename GUI_Foo to WSAPI_Foo. 2019-02-15 09:17:18 +01:00
Andreas Kling
a54cd84c59 Move WindowServer API types header into WindowServer/. 2019-02-15 09:14:21 +01:00
Andreas Kling
0d23cd73e6 VFS: Add two assertions to resolve_path() to catch corrupted file systems. 2019-02-15 09:07:29 +01:00
Andreas Kling
18210c606d Kernel: Remove GUIEventDevice.
It's no longer used since all communication now happens across sockets. :^)
2019-02-15 08:59:55 +01:00
Andreas Kling
e9d6fbfb47 Kernel: Fix some broken debug log statements. 2019-02-14 17:43:47 +01:00
Andreas Kling
c7f5213d5b LibGUI: Add some extremely primitive retrying for the server connection. 2019-02-14 17:43:20 +01:00
Andreas Kling
ce74db4e2a Userland: /bin/ls should display socket files nicely. 2019-02-14 17:30:58 +01:00
Andreas Kling
bf58241c11 Port the WindowServer and LibGUI to communicate through local sockets.
This is really cool! :^)

Apps currently refuse to start if the WindowServer isn't listening on the
socket in /wsportal. This makes sense, but I guess it would also be nice
to have some sort of "wait for server on startup" mode.

This has performance issues, and I'll work on those, but this stuff seems
to actually work and I'm very happy with that.
2019-02-14 17:18:35 +01:00
Andreas Kling
00319c248c Kernel: Let's say that listening+bound sockets "can read."
This will make it easy-peasy to select() on a socket file descriptor to wait
for incoming connections together with other activities.
2019-02-14 16:03:37 +01:00
Andreas Kling
eb1c721ef3 Kernel: Actually send things between the socket endpoints. 2019-02-14 16:01:45 +01:00