fix: end a paint when its window changes size inside it

This commit is contained in:
mirkobrombin committed 2026-11-05 09:04:46 +00:00
1 parent 752b088789
commit 0d2cbd3233
5 files changed
+78 -3

No files matched your search

+8
View File
@@ -497,6 +497,14 @@ void DesktopObjects::finish_paint(uint64_t handle)
device->text_color=0; device->background_color=0xffffff; device->background_mode=2;
}
void DesktopObjects::abandon_paint(uint64_t handle)
{
auto *record=window(handle);
if (!record || !record->painting) return;
if (auto *device=dc(record->dc); device && device->clip) { used-=device->clip->bytes(); device->clip.reset(); }
record->painting=false;
}
static bool same_name(std::string_view a,std::string_view b)
{
if (a.size()!=b.size()) return false;