summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2019-11-26 19:30:35 +0300
committerAndreas Kling <awesomekling@gmail.com>2019-11-26 19:58:25 +0100
commit22a05621d5def8240c0fb9249747d6c561b49c1c (patch)
treea98d8b3a2995ed225f44707516e2ec1077d2041b
parentc9e21b2bcc2ae063306fd4f5639285a08c9e6802 (diff)
downloadserenity-22a05621d5def8240c0fb9249747d6c561b49c1c.zip
WindowServer: Port to socket takeover
-rw-r--r--Base/etc/SystemServer.ini1
-rw-r--r--Libraries/LibGUI/GWindowServerConnection.h2
-rw-r--r--Servers/WindowServer/WSEventLoop.cpp4
3 files changed, 4 insertions, 3 deletions
diff --git a/Base/etc/SystemServer.ini b/Base/etc/SystemServer.ini
index 02d93d59d5..40381e257f 100644
--- a/Base/etc/SystemServer.ini
+++ b/Base/etc/SystemServer.ini
@@ -15,6 +15,7 @@ KeepAlive=1
User=anon
[WindowServer]
+Socket=/tmp/portal/window
Priority=high
KeepAlive=1
User=anon
diff --git a/Libraries/LibGUI/GWindowServerConnection.h b/Libraries/LibGUI/GWindowServerConnection.h
index 522dcb9bcd..218cc0944a 100644
--- a/Libraries/LibGUI/GWindowServerConnection.h
+++ b/Libraries/LibGUI/GWindowServerConnection.h
@@ -14,7 +14,7 @@ class GWindowServerConnection : public IPC::Client::Connection<WSAPI_ServerMessa
C_OBJECT(GWindowServerConnection)
public:
GWindowServerConnection()
- : Connection("/tmp/wsportal")
+ : Connection("/tmp/portal/window")
{}
void handshake() override;
diff --git a/Servers/WindowServer/WSEventLoop.cpp b/Servers/WindowServer/WSEventLoop.cpp
index 8a76065e78..dbcd0e68a2 100644
--- a/Servers/WindowServer/WSEventLoop.cpp
+++ b/Servers/WindowServer/WSEventLoop.cpp
@@ -27,8 +27,8 @@ WSEventLoop::WSEventLoop()
m_keyboard_fd = open("/dev/keyboard", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
m_mouse_fd = open("/dev/psaux", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
- unlink("/tmp/wsportal");
- m_server->listen("/tmp/wsportal");
+ bool ok = m_server->take_over_from_system_server();
+ ASSERT(ok);
m_server->on_ready_to_accept = [this] {
auto client_socket = m_server->accept();