mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibGfx: Make Rect<T> methods work when T is not int or float
Putting the implementations in the .cpp file meant that they only existed for `IntRect` and `FloatRect`, since those were instantiated at the bottom of the file. Now they work for other types. :^) A couple of places in WindowServer had to be modified to disambiguate between the two `Rect::intersected()` overloads. Co-authored-by: davidot <davidot@serenityos.org>
This commit is contained in:
@@ -686,7 +686,7 @@ void ConnectionFromClient::invalidate_rect(i32 window_id, Vector<Gfx::IntRect> c
|
||||
}
|
||||
auto& window = *(*it).value;
|
||||
for (size_t i = 0; i < rects.size(); ++i)
|
||||
window.request_update(rects[i].intersected({ {}, window.size() }), ignore_occlusion);
|
||||
window.request_update(rects[i].intersected(Gfx::Rect { {}, window.size() }), ignore_occlusion);
|
||||
}
|
||||
|
||||
void ConnectionFromClient::did_finish_painting(i32 window_id, Vector<Gfx::IntRect> const& rects)
|
||||
|
||||
Reference in New Issue
Block a user