mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:07:35 +00:00
LibGUI+WindowServer: Provide default placement to windows
This prevents windows from being opened directly on top of eachother, and provides default behavior for when window position is not specified. The new behavior is as follows: - Windows that have been created without a set position are assigned one by WindowServer. - The assigned position is either offset from the last window that is still in an assigned position, or a default position if no such window is available.
This commit is contained in:
parent
586ada7a14
commit
5ae9eee4a3
8 changed files with 62 additions and 4 deletions
|
@ -259,6 +259,9 @@ public:
|
|||
bool is_destroyed() const { return m_destroyed; }
|
||||
void destroy();
|
||||
|
||||
bool default_positioned() const { return m_default_positioned; }
|
||||
void set_default_positioned(bool p) { m_default_positioned = p; }
|
||||
|
||||
private:
|
||||
void handle_mouse_event(const MouseEvent&);
|
||||
void update_menu_item_text(PopupMenuItem item);
|
||||
|
@ -293,6 +296,7 @@ private:
|
|||
bool m_fullscreen { false };
|
||||
bool m_accessory { false };
|
||||
bool m_destroyed { false };
|
||||
bool m_default_positioned { false };
|
||||
WindowTileType m_tiled { WindowTileType::None };
|
||||
Gfx::IntRect m_untiled_rect;
|
||||
bool m_occluded { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue