From fcd9d77b642c0cd45cae61cf10ed1924f2e7945b Mon Sep 17 00:00:00 2001 From: Vaxry Date: Fri, 29 Mar 2024 00:43:50 +0000 Subject: layout: improve initial size prediction for floating --- src/layout/IHyprLayout.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/layout/IHyprLayout.hpp') diff --git a/src/layout/IHyprLayout.hpp b/src/layout/IHyprLayout.hpp index e168556e..d6c41d3b 100644 --- a/src/layout/IHyprLayout.hpp +++ b/src/layout/IHyprLayout.hpp @@ -187,7 +187,13 @@ class IHyprLayout { Called to predict the size of a newly opened window to send it a configure. Return 0,0 if unpredictable */ - virtual Vector2D predictSizeForNewWindow(); + virtual Vector2D predictSizeForNewWindowTiled() = 0; + + /* + Prefer not overriding, use predictSizeForNewWindowTiled. + */ + virtual Vector2D predictSizeForNewWindow(CWindow* pWindow); + virtual Vector2D predictSizeForNewWindowFloating(CWindow* pWindow); private: int m_iMouseMoveEventCount; -- cgit v1.2.3