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:
parent
06e33788ea
commit
53ff271c6f
5 changed files with 91 additions and 164 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue