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:
parent
555b4236f8
commit
2b9ec22576
3 changed files with 52 additions and 16 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue