From 5ff8d9a6f131296dd574e5749096d9b5d9f24618 Mon Sep 17 00:00:00 2001 From: Nishi Date: Tue, 12 May 2026 10:57:51 +0900 Subject: [PATCH] fix --- src/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index 2a7b579..f330e49 100644 --- a/src/core.c +++ b/src/core.c @@ -172,7 +172,7 @@ static void lldarkthemehandler(MwLL handle, void* data) { int* ptr = data; int s; - if(IsFirstVisible(h) && (shgeti(h->integer, MwNdarkTheme) == -1 || ((s = MwGetInteger(h, MwNdarkThemeAutomatic)) != MwDEFAULT && s))) { + if(h->widget_class == MwWindowClass && (shgeti(h->integer, MwNdarkTheme) == -1 || ((s = MwGetInteger(h, MwNdarkThemeAutomatic)) != MwDEFAULT && s))) { if(MwGetInteger(h, MwNmodernLook)) { MwVaApply(h, MwNdarkTheme, *ptr, @@ -585,7 +585,7 @@ void MwSetInteger(MwWidget handle, const char* key, int n) { shdel(h->integer, MwNdarkThemeAutomatic); - while(h->parent != NULL && h->parent->widget_class != NULL) h = h->parent; + while(h->parent != NULL && h->parent->widget_class != MwWindowClass) h = h->parent; MwLLSetDarkTheme(h->lowlevel, n); }