[DisplayServer] Add error messages and descriptions to callbacks.

This commit is contained in:
bruvzg 2024-03-01 09:52:21 +02:00
parent be56cab58c
commit 714effdf07
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
11 changed files with 77 additions and 15 deletions

View file

@ -597,7 +597,12 @@ void FreeDesktopPortalDesktop::_thread_monitor(void *p_ud) {
void FreeDesktopPortalDesktop::_system_theme_changed_callback() {
if (system_theme_changed.is_valid()) {
system_theme_changed.call();
Variant ret;
Callable::CallError ce;
system_theme_changed.callp(nullptr, 0, ret, ce);
if (ce.error != Callable::CallError::CALL_OK) {
ERR_PRINT(vformat("Failed to execute system theme changed callback: %s.", Variant::get_callable_error_text(system_theme_changed, nullptr, 0, ce)));
}
}
}