File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 11#pragma once
22
33#include < hyprutils/animation/AnimationConfig.hpp>
4+ #include < string>
45#define CONFIG_MANAGER_H
56
67#include < map>
@@ -142,10 +143,18 @@ struct SFloatCache {
142143 size_t hash;
143144
144145 SFloatCache (PHLWINDOW window, bool initial) {
145- if (initial)
146- hash = std::hash<std::string>{}(window->m_initialClass ) ^ (std::hash<std::string>{}(window->m_initialTitle ) << 1 );
147- else
148- hash = std::hash<std::string>{}(window->m_class ) ^ (std::hash<std::string>{}(window->m_title ) << 1 );
146+ // Base hash from class/title
147+ size_t baseHash = initial ? (std::hash<std::string>{}(window->m_initialClass ) ^ (std::hash<std::string>{}(window->m_initialTitle ) << 1 )) :
148+ (std::hash<std::string>{}(window->m_class ) ^ (std::hash<std::string>{}(window->m_title ) << 1 ));
149+
150+ // Use empty string as default tag value
151+ std::string tagValue = " " ;
152+ if (auto xdgTag = window->xdgTag ()) {
153+ tagValue = xdgTag.value ();
154+ }
155+
156+ // Combine hashes
157+ hash = baseHash ^ (std::hash<std::string>{}(tagValue) << 2 );
149158 }
150159
151160 bool operator ==(const SFloatCache& other) const {
Original file line number Diff line number Diff line change @@ -891,6 +891,9 @@ Vector2D IHyprLayout::predictSizeForNewWindowFloating(PHLWINDOW pWindow) { // ge
891891 // If `persistentsize` is set, use the stored size if available.
892892 const bool HASPERSISTENTSIZE = std::ranges::any_of (pWindow->m_matchedRules , [](const auto & rule) { return rule->m_ruleType == CWindowRule::RULE_PERSISTENTSIZE; });
893893
894+ if (HASPERSISTENTSIZE)
895+ Debug::log (LOG, " HASPERSISTENTSIZE!" );
896+
894897 const auto STOREDSIZE = HASPERSISTENTSIZE ? g_pConfigManager->getStoredFloatingSize (pWindow) : std::nullopt ;
895898
896899 if (STOREDSIZE.has_value ()) {
You can’t perform that action at this time.
0 commit comments