added nomaxsize rule

This commit is contained in:
vaxerski 2022-12-07 16:08:44 +00:00
parent d8dcf670da
commit 73b3bbe49b
4 changed files with 5 additions and 1 deletions

View file

@ -39,6 +39,7 @@ struct SWindowAdditionalConfigData {
bool forceNoBorder = false;
bool forceNoShadow = false;
bool windowDanceCompat = false;
bool noMaxSize = false;
};
struct SWindowRule {

View file

@ -749,6 +749,7 @@ bool windowRuleValid(const std::string& RULE) {
&& RULE != "forceinput"
&& RULE != "fullscreen"
&& RULE != "nofullscreenrequest"
&& RULE != "nomaxsize"
&& RULE != "pin"
&& RULE != "noanim"
&& RULE != "windowdance"

View file

@ -170,6 +170,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
requestsFullscreen = true;
} else if (r.szRule == "windowdance") {
PWINDOW->m_sAdditionalConfigData.windowDanceCompat = true;
} else if (r.szRule == "nomaxsize") {
PWINDOW->m_sAdditionalConfigData.noMaxSize = true;
} else if (r.szRule == "forceinput") {
PWINDOW->m_sAdditionalConfigData.forceAllowsInput = true;
} else if (r.szRule == "pin") {

View file

@ -263,7 +263,7 @@ Vector2D CHyprXWaylandManager::getMaxSizeForWindow(CWindow* pWindow) {
if (!g_pCompositor->windowValidMapped(pWindow))
return Vector2D(99999, 99999);
if ((pWindow->m_bIsX11 && !pWindow->m_uSurface.xwayland->size_hints) || (!pWindow->m_bIsX11 && !pWindow->m_uSurface.xdg->toplevel))
if ((pWindow->m_bIsX11 && !pWindow->m_uSurface.xwayland->size_hints) || (!pWindow->m_bIsX11 && !pWindow->m_uSurface.xdg->toplevel) || pWindow->m_sAdditionalConfigData.noMaxSize)
return Vector2D(99999, 99999);
auto MAXSIZE = pWindow->m_bIsX11 ? Vector2D(pWindow->m_uSurface.xwayland->size_hints->max_width, pWindow->m_uSurface.xwayland->size_hints->max_height)