WindowServer: Enable screen capture to span multiple screens

This enables the shot utility to capture all screens or just one, and
enables the Magnifier application to track the mouse cursor across
multiple screens.
This commit is contained in:
Tom 2021-06-18 21:42:25 -06:00 committed by Andreas Kling
commit f232cb8efe
Notes: sideshowbarker 2024-07-18 11:58:48 +09:00
6 changed files with 99 additions and 14 deletions

View file

@ -64,6 +64,13 @@ Compositor::Compositor()
init_bitmaps();
}
const Gfx::Bitmap* Compositor::cursor_bitmap_for_screenshot(Badge<ClientConnection>, Screen& screen) const
{
if (!m_current_cursor)
return nullptr;
return &m_current_cursor->bitmap(screen.scale_factor());
}
const Gfx::Bitmap& Compositor::front_bitmap_for_screenshot(Badge<ClientConnection>, Screen& screen) const
{
return *m_screen_data[screen.index()].m_front_bitmap;