mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 15:34:58 +00:00
Port LibGUI to use CIPCClientSideConnection
As a consequence, move to use an explicit handshake() method rather than calling virtuals from the constructor. This seemed to not bother AClientConnection, but LibGUI crashes (rightfully) because of it.
This commit is contained in:
parent
41bece0682
commit
2177594c96
18 changed files with 195 additions and 280 deletions
|
@ -15,7 +15,7 @@ GDesktop::GDesktop()
|
|||
{
|
||||
}
|
||||
|
||||
void GDesktop::did_receive_screen_rect(Badge<GEventLoop>, const Rect& rect)
|
||||
void GDesktop::did_receive_screen_rect(Badge<GWindowServerConnection>, const Rect& rect)
|
||||
{
|
||||
if (m_rect == rect)
|
||||
return;
|
||||
|
@ -31,7 +31,7 @@ bool GDesktop::set_wallpaper(const StringView& path)
|
|||
ASSERT(path.length() < (int)sizeof(message.text));
|
||||
strncpy(message.text, path.characters_without_null_termination(), path.length());
|
||||
message.text_length = path.length();
|
||||
auto response = GEventLoop::current().sync_request(message, WSAPI_ServerMessage::Type::DidSetWallpaper);
|
||||
auto response = GEventLoop::current().connection().sync_request(message, WSAPI_ServerMessage::Type::DidSetWallpaper);
|
||||
return response.value;
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,6 @@ String GDesktop::wallpaper() const
|
|||
{
|
||||
WSAPI_ClientMessage message;
|
||||
message.type = WSAPI_ClientMessage::Type::GetWallpaper;
|
||||
auto response = GEventLoop::current().sync_request(message, WSAPI_ServerMessage::Type::DidGetWallpaper);
|
||||
auto response = GEventLoop::current().connection().sync_request(message, WSAPI_ServerMessage::Type::DidGetWallpaper);
|
||||
return String(response.text, response.text_length);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue