1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

WindowServer: Consolidate tiled and maximized window rects calculation

Calculating tiled and miximized window frame have a lot in common. In
fact, we can look at maximized window state as a special case of the
tile type. It simplifies the code since there is a lot of cases when
we take an action only if the window is maximized or tiled.
This commit is contained in:
Vitaly Dyachkov 2022-02-09 16:26:46 +01:00 committed by Andreas Kling
parent 06e33788ea
commit 53ff271c6f
5 changed files with 91 additions and 164 deletions

View file

@ -88,7 +88,7 @@ public:
void notify_progress_changed(Window&);
void notify_modified_changed(Window&);
Gfx::IntRect maximized_window_rect(Window const&, bool relative_to_window_screen = false) const;
Gfx::IntRect tiled_window_rect(Window const&, WindowTileType tile_type = WindowTileType::Maximized, bool relative_to_window_screen = false) const;
ClientConnection const* dnd_client() const { return m_dnd_client.ptr(); }
Core::MimeData const& dnd_mime_data() const { return *m_dnd_mime_data; }