mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
WindowServer: Use relative coordinates when flushing screen dirty rects
The framebuffer device expects coordinates relative to itself.
This commit is contained in:
parent
c12cbb96ce
commit
708f27ca0e
1 changed files with 2 additions and 2 deletions
|
@ -319,8 +319,8 @@ void ScreenInput::on_receive_keyboard_data(::KeyEvent kernel_event)
|
||||||
void Screen::flush_display(const Gfx::IntRect& flush_region)
|
void Screen::flush_display(const Gfx::IntRect& flush_region)
|
||||||
{
|
{
|
||||||
FBRect rect {
|
FBRect rect {
|
||||||
.x = static_cast<unsigned>(flush_region.x()) * scale_factor(),
|
.x = (static_cast<unsigned>(flush_region.x()) - m_virtual_rect.left()) * scale_factor(),
|
||||||
.y = static_cast<unsigned>(flush_region.y()) * scale_factor(),
|
.y = (static_cast<unsigned>(flush_region.y()) - m_virtual_rect.top()) * scale_factor(),
|
||||||
.width = static_cast<unsigned>(flush_region.width()) * scale_factor(),
|
.width = static_cast<unsigned>(flush_region.width()) * scale_factor(),
|
||||||
.height = static_cast<unsigned>(flush_region.height() * scale_factor())
|
.height = static_cast<unsigned>(flush_region.height() * scale_factor())
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue