* @brief Returns the (widgetType, relativeIndex) identity for the given live * windowId, or an invalid key when the windowId is unknown. */
| 141 | * windowId, or an invalid key when the windowId is unknown. |
| 142 | */ |
| 143 | [[nodiscard]] static StableKey stableKeyForWindowId(int windowId) |
| 144 | { |
| 145 | const auto& widgetMap = UI::Dashboard::instance().widgetMap(); |
| 146 | const auto it = widgetMap.constFind(windowId); |
| 147 | if (it == widgetMap.cend()) |
| 148 | return {}; |
| 149 | |
| 150 | return {static_cast<int>(it.value().first), it.value().second}; |
| 151 | } |
| 152 | |
| 153 | /** |
| 154 | * @brief Shrinks a snap rectangle when its bottom reaches the canvas floor, |
no test coverage detected