Snapshot before repaint phase 2

This commit is contained in:
Codex
2026-04-07 21:37:49 +08:00
parent b07a4ec370
commit 77a8fe568a
10 changed files with 395 additions and 131 deletions
+8
View File
@@ -5,6 +5,7 @@ Dialog::Dialog(Window& h, std::string text, std::string message, StellarX::Messa
: Canvas(), message(message), type(type), modal(modal), hWnd(h), titleText(text)
{
this->id = "Dialog";
setHostWindow(&hWnd);
show = false;
}
@@ -757,6 +758,13 @@ std::unique_ptr<Button> Dialog::createDialogButton(int x, int y, const std::stri
void Dialog::requestRepaint(Control* parent)
{
if (shouldDeferManagedRepaint())
{
if (auto* host = getHostWindow())
host->requestManagedRepaint();
return;
}
if (this == parent)
{
for (auto& control : controls)