1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:28:13 +00:00

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 :^)
This commit is contained in:
Andreas Kling 2019-02-17 00:13:47 +01:00
parent 0b1b21d622
commit 640360e958
41 changed files with 325 additions and 463 deletions

View file

@ -40,7 +40,7 @@ GEventLoop::GEventLoop()
address.sun_family = AF_LOCAL;
strcpy(address.sun_path, "/wsportal");
int retries = 10;
int retries = 1000;
int rc = 0;
while (retries) {
rc = connect(m_event_fd, (const sockaddr*)&address, sizeof(address));
@ -53,6 +53,7 @@ GEventLoop::GEventLoop()
if (rc < 0) {
ASSERT_NOT_REACHED();
}
dbgprintf("(%u) GEventLoop constructed :)\n", getpid());
}
GEventLoop::~GEventLoop()

View file

@ -7,6 +7,8 @@
#include <SharedGraphics/GraphicsBitmap.h>
#include <SharedGraphics/Painter.h>
#include <unistd.h>
GWidget::GWidget(GWidget* parent)
: GObject(parent)
{
@ -72,7 +74,9 @@ void GWidget::handle_paint_event(GPaintEvent& event)
Painter painter(*this);
painter.fill_rect(event.rect(), background_color());
}
dbgprintf("GWidget{%p} handle_paint_event %s before calling paint_event()\n", this, event.rect().to_string().characters());
paint_event(event);
dbgprintf("GWidget{%p} handle_paint_event %s after calling paint_event()\n", this, event.rect().to_string().characters());
for (auto* ch : children()) {
auto* child = (GWidget*)ch;
if (child->relative_rect().intersects(event.rect())) {