mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2025-12-01 12:22:13 +00:00
all: Window rules V3 Fixes (#541)
This commit is contained in:
@ -68,7 +68,7 @@ void CBordersPlusPlus::draw(PHLMONITOR pMonitor, const float& a) {
|
||||
|
||||
const auto PWINDOW = m_pWindow.lock();
|
||||
|
||||
if (!PWINDOW->m_windowData.decorate.valueOrDefault())
|
||||
if (!PWINDOW->m_ruleApplicator->decorate().valueOrDefault())
|
||||
return;
|
||||
|
||||
CBorderPPPassElement::SBorderPPData data;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#include <hyprland/src/render/OpenGL.hpp>
|
||||
#include <hyprland/src/devices/IPointer.hpp>
|
||||
#include <hyprland/src/devices/ITouch.hpp>
|
||||
#include <hyprland/src/desktop/WindowRule.hpp>
|
||||
#include <hyprland/src/desktop/rule/windowRule/WindowRule.hpp>
|
||||
#include <hyprland/src/helpers/AnimatedVariable.hpp>
|
||||
#include <hyprland/src/helpers/time/Time.hpp>
|
||||
#include "globals.hpp"
|
||||
|
||||
@ -52,15 +52,15 @@ static void onFocusChange(PHLWINDOW window) {
|
||||
const auto POUT = g_pConfigManager->getAnimationPropertyConfig("hyprfocusOut");
|
||||
|
||||
if (*PMODE == "flash") {
|
||||
const auto ORIGINAL = window->m_activeInactiveAlpha->goal();
|
||||
window->m_activeInactiveAlpha->setConfig(PIN);
|
||||
*window->m_activeInactiveAlpha = std::clamp(*POPACITY, 0.F, 1.F);
|
||||
|
||||
window->m_activeInactiveAlpha->setCallbackOnEnd([w = PHLWINDOWREF{window}, POUT](WP<CBaseAnimatedVariable> pav) {
|
||||
window->m_activeInactiveAlpha->setCallbackOnEnd([w = PHLWINDOWREF{window}, POUT, ORIGINAL](WP<CBaseAnimatedVariable> pav) {
|
||||
if (!w)
|
||||
return;
|
||||
w->m_activeInactiveAlpha->setConfig(POUT);
|
||||
g_pCompositor->updateWindowAnimatedDecorationValues(w.lock());
|
||||
w->updateDynamicRules();
|
||||
*w->m_activeInactiveAlpha = ORIGINAL;
|
||||
|
||||
w->m_activeInactiveAlpha->setCallbackOnEnd(nullptr);
|
||||
});
|
||||
|
||||
@ -385,7 +385,7 @@ void CScrollingLayout::applyNodeDataToWindow(SP<SScrollingWindowData> data, bool
|
||||
if (PWINDOW->isFullscreen() && !data->ignoreFullscreenChecks)
|
||||
return;
|
||||
|
||||
PWINDOW->unsetWindowData(PRIORITY_LAYOUT);
|
||||
PWINDOW->m_ruleApplicator->resetProps(Desktop::Rule::RULE_PROP_ALL, Desktop::Types::PRIORITY_LAYOUT);
|
||||
PWINDOW->updateWindowData();
|
||||
|
||||
static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in");
|
||||
@ -641,7 +641,7 @@ void CScrollingLayout::resizeActiveWindow(const Vector2D& delta, eRectCorner cor
|
||||
if (!DATA) {
|
||||
*PWINDOW->m_realSize =
|
||||
(PWINDOW->m_realSize->goal() + delta)
|
||||
.clamp(PWINDOW->m_windowData.minSize.valueOr(Vector2D{MIN_WINDOW_SIZE, MIN_WINDOW_SIZE}), PWINDOW->m_windowData.maxSize.valueOr(Vector2D{INFINITY, INFINITY}));
|
||||
.clamp(PWINDOW->m_ruleApplicator->minSize().valueOr(Vector2D{MIN_WINDOW_SIZE, MIN_WINDOW_SIZE}), PWINDOW->m_ruleApplicator->maxSize().valueOr(Vector2D{INFINITY, INFINITY}));
|
||||
PWINDOW->updateWindowDecos();
|
||||
return;
|
||||
}
|
||||
@ -753,7 +753,7 @@ void CScrollingLayout::fullscreenRequestForWindow(PHLWINDOW pWindow, const eFull
|
||||
*pWindow->m_realPosition = pWindow->m_lastFloatingPosition;
|
||||
*pWindow->m_realSize = pWindow->m_lastFloatingSize;
|
||||
|
||||
pWindow->unsetWindowData(PRIORITY_LAYOUT);
|
||||
pWindow->m_ruleApplicator->resetProps(Desktop::Rule::RULE_PROP_ALL, Desktop::Types::PRIORITY_LAYOUT);
|
||||
pWindow->updateWindowData();
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -87,7 +87,7 @@ void CTrail::draw(PHLMONITOR pMonitor, const float& a) {
|
||||
|
||||
const auto PWINDOW = m_pWindow.lock();
|
||||
|
||||
if (!PWINDOW->m_windowData.decorate.valueOrDefault())
|
||||
if (!PWINDOW->m_ruleApplicator->decorate().valueOrDefault())
|
||||
return;
|
||||
|
||||
auto data = CTrailPassElement::STrailData{this, a};
|
||||
|
||||
Reference in New Issue
Block a user