1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:47:35 +00:00

WindowServer: Optimize backing store placement for resizing windows

When a window is being resized, its size may differ from the size of its backing
store. In this case, peek at the direction the window is being resized in, and
render the backing store at the same place as it was previously.

https://github.com/SerenityOS/serenity/issues/52
This commit is contained in:
Sergey Bugaev 2019-11-22 19:13:32 +03:00 committed by Andreas Kling
parent 555b4236f8
commit 2b9ec22576
3 changed files with 52 additions and 16 deletions

View file

@ -1108,6 +1108,13 @@ void WSWindowManager::set_resize_candidate(WSWindow& window, ResizeDirection dir
m_resize_direction = direction;
}
ResizeDirection WSWindowManager::resize_direction_of_window(const WSWindow& window)
{
if (&window != m_resize_window)
return ResizeDirection::None;
return m_resize_direction;
}
Rect WSWindowManager::maximized_window_rect(const WSWindow& window) const
{
Rect rect = WSScreen::the().rect();