mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 19:07:35 +00:00
LibGUI: Handle fast_greet stuff in WindowServerConnection constructor
Move the from handshake() to the constructor (and move the constructor out-of-line while we're at it.) This prepares getting rid of the handshake() mechanism since this is the only remaining user.
This commit is contained in:
parent
0af69e8917
commit
2eceabdcfd
2 changed files with 5 additions and 8 deletions
|
@ -41,7 +41,8 @@ static void set_system_theme_from_anonymous_buffer(Core::AnonymousBuffer buffer)
|
|||
Application::the()->set_system_palette(buffer);
|
||||
}
|
||||
|
||||
void WindowServerConnection::handshake()
|
||||
WindowServerConnection::WindowServerConnection()
|
||||
: IPC::ServerConnection<WindowClientEndpoint, WindowServerEndpoint>(*this, "/tmp/portal/window")
|
||||
{
|
||||
// NOTE: WindowServer automatically sends a "fast_greet" message to us when we connect.
|
||||
// All we have to do is wait for it to arrive. This avoids a round-trip during application startup.
|
||||
|
|
|
@ -17,16 +17,12 @@ class WindowServerConnection
|
|||
, public WindowClientEndpoint {
|
||||
C_OBJECT(WindowServerConnection)
|
||||
public:
|
||||
WindowServerConnection()
|
||||
: IPC::ServerConnection<WindowClientEndpoint, WindowServerEndpoint>(*this, "/tmp/portal/window")
|
||||
{
|
||||
handshake();
|
||||
}
|
||||
|
||||
virtual void handshake() override;
|
||||
virtual void handshake() override { }
|
||||
static WindowServerConnection& the();
|
||||
|
||||
private:
|
||||
WindowServerConnection();
|
||||
|
||||
virtual void fast_greet(Gfx::IntRect const&, Core::AnonymousBuffer const&, String const&, String const&) override;
|
||||
virtual void paint(i32, Gfx::IntSize const&, Vector<Gfx::IntRect> const&) override;
|
||||
virtual void mouse_move(i32, Gfx::IntPoint const&, u32, u32, u32, i32, bool, Vector<String> const&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue