mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +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
Notes:
sideshowbarker
2024-07-18 11:28:12 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/708f27ca0e9 Pull-request: https://github.com/SerenityOS/serenity/pull/8255 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/ccapitalK Reviewed-by: https://github.com/supercomputer7
|
@ -319,8 +319,8 @@ void ScreenInput::on_receive_keyboard_data(::KeyEvent kernel_event)
|
|||
void Screen::flush_display(const Gfx::IntRect& flush_region)
|
||||
{
|
||||
FBRect rect {
|
||||
.x = static_cast<unsigned>(flush_region.x()) * scale_factor(),
|
||||
.y = static_cast<unsigned>(flush_region.y()) * scale_factor(),
|
||||
.x = (static_cast<unsigned>(flush_region.x()) - m_virtual_rect.left()) * scale_factor(),
|
||||
.y = (static_cast<unsigned>(flush_region.y()) - m_virtual_rect.top()) * scale_factor(),
|
||||
.width = static_cast<unsigned>(flush_region.width()) * scale_factor(),
|
||||
.height = static_cast<unsigned>(flush_region.height() * scale_factor())
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue