* @brief Returns the total top inset (shadow + CSD titlebar) reserved above the content area. */
| 161 | * @brief Returns the total top inset (shadow + CSD titlebar) reserved above the content area. |
| 162 | */ |
| 163 | int NativeWindow::frameTopInset(QObject* window) |
| 164 | { |
| 165 | auto* w = qobject_cast<QWindow*>(window); |
| 166 | if (!w) |
| 167 | return 0; |
| 168 | |
| 169 | if (isWindows11() || !m_csdEnabled) |
| 170 | return 0; |
| 171 | |
| 172 | if (auto* decorator = s_decorators.value(w, nullptr)) |
| 173 | return decorator->shadowMargin() + decorator->titleBarHeight(); |
| 174 | |
| 175 | return (m_csdShadowEnabled ? CSD::ShadowRadius : 0) + CSD::TitleBarHeight; |
| 176 | } |
| 177 | |
| 178 | /** |
| 179 | * @brief Removes a window from the management list. |
nothing calls this directly
no test coverage detected