* Read default values from WindowDesc configuration an apply them to the window. */
| 191 | * Read default values from WindowDesc configuration an apply them to the window. |
| 192 | */ |
| 193 | void Window::ApplyDefaults() |
| 194 | { |
| 195 | if (this->nested_root != nullptr && this->nested_root->GetWidgetOfType(WWT_STICKYBOX) != nullptr) { |
| 196 | if (this->window_desc.pref_sticky) this->flags.Set(WindowFlag::Sticky); |
| 197 | } else { |
| 198 | /* There is no stickybox; clear the preference in case someone tried to be funny */ |
| 199 | this->window_desc.pref_sticky = false; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Compute the row of a widget that a user clicked in. |
no test coverage detected