Luna/wind/Client.h
apio ce9d0f5856
wind: Fix client references being out-of-date in windows when disconnecting other clients
Classic "keeping a pointer to an element inside a vector after the vector is updated" bug, ah yes.
2023-08-21 14:06:58 +02:00

19 lines
342 B
C

#pragma once
#include "Window.h"
#include <os/LocalServer.h>
struct Client
{
os::LocalServer::Client conn;
Vector<Window*> windows;
bool rpc_in_progress { false };
u8 rpc_id { 0 };
Client(os::LocalServer::Client&& client)
#ifdef CLIENT_IMPLEMENTATION
: conn(move(client)), windows() {}
#else
;
#endif
};