From 3e6360d024e388e71e05507fad23a3cdcfadcb90 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 2 Aug 2022 16:00:13 -0300 Subject: [PATCH 1/2] Fix crash using deleted os::Surface (fix #3451) It looks like processing a specific kPaintMessage with ui::Widget::sendMessage() might re-create the os::Surface and destroy the previous one, so we need to keep a reference to the previous surface just in case to keep it alive. We aren't able to reproduce this crash, but we've received several Sentry reports about it, only on Windows and since v1.2.34.1 (not sure if it's related to that). We'll see if this does fix the crashes or we have some kind of regression in the future. --- src/ui/manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/manager.cpp b/src/ui/manager.cpp index 32b05cd6d..6d28b71cf 100644 --- a/src/ui/manager.cpp +++ b/src/ui/manager.cpp @@ -1549,7 +1549,7 @@ bool Manager::sendMessageToWidget(Message* msg, Widget* widget) // Restore overlays in the region that we're going to paint. OverlayManager::instance()->restoreOverlappedAreas(paintMsg->rect()); - os::Surface* surface = m_display->surface(); + os::SurfaceRef surface(base::AddRef(m_display->surface())); surface->saveClip(); if (surface->clipRect(paintMsg->rect())) { From 55885ee266fbb7d01894cf0a456aaceb8cc807c7 Mon Sep 17 00:00:00 2001 From: Gaspar Capello Date: Fri, 29 Jul 2022 18:42:20 -0300 Subject: [PATCH 2/2] Fix regression: TextBox isn't rendering text (doesn't update the bounds area of the text box) Regression in dd0c29620974e56d9e62653804b996740a89e88a (Use tooltip_text style & color to paint tooltip windows #2554). Prior this fix, text box does not update its bounds area because it has not a style assigned. Fix #3442, fix #3443 --- data/extensions/aseprite-theme/theme.xml | 4 ++++ src/app/ui/skin/skin_theme.cpp | 3 +-- src/ui/theme.cpp | 9 +++------ src/ui/theme.h | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/extensions/aseprite-theme/theme.xml b/data/extensions/aseprite-theme/theme.xml index 558031496..52586b1b4 100644 --- a/data/extensions/aseprite-theme/theme.xml +++ b/data/extensions/aseprite-theme/theme.xml @@ -503,6 +503,10 @@ +