layout: improve initial size prediction for floating

This commit is contained in:
Vaxry
2024-03-29 00:43:50 +00:00
parent 2930c5cb6f
commit fcd9d77b64
7 changed files with 67 additions and 23 deletions

View File

@@ -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;