MCPcopy Create free account
hub / github.com/Bananymous/banan-os / WindowServer

Method WindowServer

userspace/programs/WindowServer/WindowServer.cpp:19–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18WindowServer::WindowServer(Framebuffer& framebuffer, int32_t corner_radius)
19 : m_framebuffer(framebuffer)
20 , m_corner_radius(corner_radius)
21 , m_cursor({ framebuffer.width / 2, framebuffer.height / 2 })
22 , m_font(MUST(LibFont::Font::load("/usr/share/fonts/lat0-16.psfu"_sv)))
23{
24 MUST(m_background_image.resize(m_framebuffer.width * m_framebuffer.height, 0xFF101010));
25
26 add_damaged_area(m_framebuffer.area());
27}
28
29BAN::ErrorOr<void> WindowServer::set_background_image(BAN::UniqPtr<LibImage::Image> image)
30{
31 if (image->width() != (uint64_t)m_framebuffer.width || image->height() != (uint64_t)m_framebuffer.height)

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.45
areaMethod · 0.45

Tested by

no test coverage detected