mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +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
Notes:
sideshowbarker
2024-07-19 13:12:24 +09:00
Author: https://github.com/rburchell
Commit: 2177594c96
Pull-request: https://github.com/SerenityOS/serenity/pull/327
Reviewed-by: https://github.com/awesomekling
18 changed files with 195 additions and 280 deletions
|
@ -19,7 +19,7 @@ int GMenuBar::realize_menubar()
|
|||
{
|
||||
WSAPI_ClientMessage request;
|
||||
request.type = WSAPI_ClientMessage::Type::CreateMenubar;
|
||||
WSAPI_ServerMessage response = GEventLoop::current().sync_request(request, WSAPI_ServerMessage::Type::DidCreateMenubar);
|
||||
WSAPI_ServerMessage response = GEventLoop::current().connection().sync_request(request, WSAPI_ServerMessage::Type::DidCreateMenubar);
|
||||
return response.menu.menubar_id;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ void GMenuBar::unrealize_menubar()
|
|||
WSAPI_ClientMessage request;
|
||||
request.type = WSAPI_ClientMessage::Type::DestroyMenubar;
|
||||
request.menu.menubar_id = m_menubar_id;
|
||||
GEventLoop::current().sync_request(request, WSAPI_ServerMessage::Type::DidDestroyMenubar);
|
||||
GEventLoop::current().connection().sync_request(request, WSAPI_ServerMessage::Type::DidDestroyMenubar);
|
||||
m_menubar_id = -1;
|
||||
}
|
||||
|
||||
|
@ -47,12 +47,12 @@ void GMenuBar::notify_added_to_application(Badge<GApplication>)
|
|||
request.type = WSAPI_ClientMessage::Type::AddMenuToMenubar;
|
||||
request.menu.menubar_id = m_menubar_id;
|
||||
request.menu.menu_id = menu_id;
|
||||
GEventLoop::current().sync_request(request, WSAPI_ServerMessage::Type::DidAddMenuToMenubar);
|
||||
GEventLoop::current().connection().sync_request(request, WSAPI_ServerMessage::Type::DidAddMenuToMenubar);
|
||||
}
|
||||
WSAPI_ClientMessage request;
|
||||
request.type = WSAPI_ClientMessage::Type::SetApplicationMenubar;
|
||||
request.menu.menubar_id = m_menubar_id;
|
||||
GEventLoop::current().sync_request(request, WSAPI_ServerMessage::Type::DidSetApplicationMenubar);
|
||||
GEventLoop::current().connection().sync_request(request, WSAPI_ServerMessage::Type::DidSetApplicationMenubar);
|
||||
}
|
||||
|
||||
void GMenuBar::notify_removed_from_application(Badge<GApplication>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue