mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
WindowServer: Add an IPC call for taking a screenshot
This patch adds Messages::WindowServer::GetScreenBitmap. It returns the currently displayed on-screen bitmap as-is, as a Gfx::ShareableBitmap.
This commit is contained in:
parent
557927f25b
commit
d9f8f6a2d0
4 changed files with 11 additions and 0 deletions
|
@ -987,4 +987,10 @@ void ClientConnection::did_become_responsive()
|
|||
set_unresponsive(false);
|
||||
}
|
||||
|
||||
OwnPtr<Messages::WindowServer::GetScreenBitmapResponse> ClientConnection::handle(const Messages::WindowServer::GetScreenBitmap&)
|
||||
{
|
||||
auto& bitmap = Compositor::the().front_bitmap_for_screenshot({});
|
||||
return make<Messages::WindowServer::GetScreenBitmapResponse>(bitmap.to_shareable_bitmap());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue