Simpler diff to the widgets
sample below. Happens with GTK >= 3.20. I think this is related to gdk_window_process_updates()
, which has been deprecated. Unfortunately, with GTK, "deprecated" all too often means "don't use this, because we broke it".
diff --git a/samples/widgets/gauge.cpp b/samples/widgets/gauge.cpp index ae7ad77f8d..34474b5ed3 100644 --- a/samples/widgets/gauge.cpp +++ b/samples/widgets/gauge.cpp @@ -444,12 +444,15 @@ void GaugeWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event)) CreateGauge(); } +#include "wx/statusbr.h" +extern wxStatusBar* sb; void GaugeWidgetsPage::OnProgressTimer(wxTimerEvent& WXUNUSED(event)) { int val = m_gauge->GetValue(); if ( (unsigned)val < m_range ) { m_gauge->SetValue(val + 1); + sb->SetStatusText(val & 1 ? "aaaa" : "BBBB"); } else // reached the end { diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp index 0ac3997c1c..eb6424ec77 100644 --- a/samples/widgets/widgets.cpp +++ b/samples/widgets/widgets.cpp @@ -362,6 +362,7 @@ wxEND_EVENT_TABLE() // app class // ---------------------------------------------------------------------------- +wxStatusBar* sb; bool WidgetsApp::OnInit() { if ( !wxApp::OnInit() ) @@ -390,6 +391,7 @@ bool WidgetsApp::OnInit() wxFrame *frame = new WidgetsFrame(title + " widgets demo"); frame->Show(); + sb = frame->CreateStatusBar(); #if USE_LOG m_logTarget = wxLog::GetActiveTarget();
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.
So would it be enough to avoid calling Update()
in wxStatusBarGeneric::DoUpdateStatusText()
if it's unnecessary because, apparently, there is already a pending update after gtk_progress_bar_set_fraction()
call? Would there be some GTK-native way for determining this?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.