1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

Userland: Update IPC calls to use proxies

This updates all existing code to use the auto-generated client
methods instead of post_message/send_sync.
This commit is contained in:
Gunnar Beutner 2021-05-03 13:33:59 +02:00 committed by Andreas Kling
parent 78803ce384
commit 5bb79ea0a7
63 changed files with 303 additions and 316 deletions

View file

@ -43,7 +43,7 @@ static i32 s_next_callback_id = 1;
i32 DisplayLink::register_callback(Function<void(i32)> callback)
{
if (callbacks().is_empty())
WindowServerConnection::the().post_message(Messages::WindowServer::EnableDisplayLink());
WindowServerConnection::the().async_enable_display_link();
i32 callback_id = s_next_callback_id++;
callbacks().set(callback_id, adopt_ref(*new DisplayLinkCallback(callback_id, move(callback))));
@ -57,7 +57,7 @@ bool DisplayLink::unregister_callback(i32 callback_id)
callbacks().remove(callback_id);
if (callbacks().is_empty())
WindowServerConnection::the().post_message(Messages::WindowServer::DisableDisplayLink());
WindowServerConnection::the().async_disable_display_link();
return true;
}