1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:07:34 +00:00

WindowServer: Unify Window restore rects

Previously, different rects were used to restore tiled and maximized
windows, creating edge cases for inconsistent restoration. All states
now restore m_floating_rect, which saves the last valid size and
location of a window while free-floating.
This commit is contained in:
thankyouverycool 2022-02-07 13:22:02 -05:00 committed by Andreas Kling
parent 3d7e701451
commit 1607fd511f
3 changed files with 19 additions and 6 deletions

View file

@ -123,6 +123,9 @@ public:
void check_untile_due_to_resize(Gfx::IntRect const&);
bool set_untiled(Optional<Gfx::IntPoint> fixed_point = {});
Gfx::IntRect floating_rect() const { return m_floating_rect; }
void set_floating_rect(Gfx::IntRect rect) { m_floating_rect = rect; }
void set_forced_shadow(bool b) { m_forced_shadow = b; }
bool has_forced_shadow() const { return m_forced_shadow; }
@ -436,7 +439,7 @@ private:
bool m_invalidate_last_render_rects { false };
Vector<i32> m_stealable_by_client_ids;
WindowTileType m_tile_type { WindowTileType::None };
Gfx::IntRect m_untiled_rect;
Gfx::IntRect m_floating_rect;
bool m_occluded { false };
RefPtr<Gfx::Bitmap> m_backing_store;
RefPtr<Gfx::Bitmap> m_last_backing_store;