Today, I noticed that when I resize the "Build log" panel, I see this window get flickered a lot. When I drag the panel edge between our cbEditor window and the Build log, I don't see the cbEditor get flickered.
So, I prepared a patch, and it looks like with this patch, the "Build log"'s flicker get reduced, can you try this patch? Or maybe there are many other method to handle this.
From 015270b1dc35f3020e549c0e7af310fcb682b66d Mon Sep 17 00:00:00 2001
From: asmwarrior <hidehide@hidehide.com>
Date: Wed, 25 Mar 2026 18:08:38 +0800
Subject: [PATCH] text logger: try to enable the double buffering to stop the
flickering
---
src/sdk/loggers.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/sdk/loggers.cpp b/src/sdk/loggers.cpp
index f3ec29f8d..25f8d5c18 100644
--- a/src/sdk/loggers.cpp
+++ b/src/sdk/loggers.cpp
@@ -169,6 +169,17 @@ wxWindow* TextCtrlLogger::CreateControl(wxWindow* parent)
{
if (!control)
control = new wxTextCtrl(parent, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxTE_NOHIDESEL | wxTE_AUTO_URL);
+
+ // Enable double buffering to stop flickering
+ if (control)
+ {
+ control->SetDoubleBuffered(true);
+ // In your event table or Bind calls:
+ control->Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent& event) {
+ // Do nothing here to skip the default background clearing
+ });
+ }
+
return control;
}
Thanks.
I wrote some code snippet like this
if (control)
{
// Check if it's already enabled (either by default or previously set)
if (!control->IsDoubleBuffered())
{
control->SetDoubleBuffered(true);
}
// Always a good idea to bind this if you're still seeing "white flashes"
control->Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent& event) {
// Leave empty to prevent background clearing
});
}
I set the breakpoint inside the "if (!control->IsDoubleBuffered())" clause, and I see it hit there. So, under wx 3.3.2, the double buffer is not enabled by default, so calling the "control->SetDoubleBuffered(true);" will enable it.
in fact, it is not redrawn until I release the mouse button
OK, I see such option, it is an option for Windows OS's graphics system to reduce the flicker.