mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-28 07:38:29 -04:00
Rework UI lifecycle, finish renaming & cleanup
This commit is contained in:
@@ -101,6 +101,15 @@ bool Document::focus() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Document::has_focus() const {
|
||||
if (mDocument == nullptr) {
|
||||
return false;
|
||||
}
|
||||
auto* context = mDocument->GetContext();
|
||||
const auto* focused = context != nullptr ? context->GetFocusElement() : nullptr;
|
||||
return focused != nullptr && focused->GetOwnerDocument() == mDocument;
|
||||
}
|
||||
|
||||
bool Document::set_document_styles(const Rml::String& rcss) {
|
||||
if (rcss.empty()) {
|
||||
mDocumentStyleSheets = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user