MSW: Minimize dark mode border flicker (PR #26631)

18 views
Skip to first unread message

Steve Cornett

unread,
Jun 25, 2026, 10:21:46 AM (3 days ago) Jun 25
to wx-...@googlegroups.com, Subscribed

These changes address flickering borders in dark mode, primarily with the non-rich wxTextCtrl. The wxListBox border also flickers, but is less noticeable. See #26630.

The flicker occurs when the mouse moves over the border or scroll bar. The problem might not be reproducible on all systems, perhaps depending on graphics drivers. The cause is that these controls generate many unnecessary WM_NCPAINT messages. In our WM_NCPAINT handler, the the light mode border gets drawn and the dark mode border over that.

The solution is to use the DarkMode_DarkTheme theme when available. With this theme, these controls draw a good dark border for most border styles, including the default style. In this case, we do not draw over the border. A new member is introduced to the MSWDarkModeSupport struct to indicate whether we need the custom border drawing.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26631

Commit Summary

  • a8cc3b9 Use DarkMode_DarkTheme and avoid redrawing border

File Changes

(5 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26631@github.com>

Steve Cornett

unread,
Jun 25, 2026, 11:55:33 AM (3 days ago) Jun 25
to wx-...@googlegroups.com, Push

@stevecor pushed 1 commit.

  • cacbba5 Convert border styles that flicker to wxBORDER_SIMPLE


View it on GitHub or unsubscribe.


Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26631/before/a8cc3b9b6e61b80973be093699ec0cd7e3f7d9b1/after/cacbba5bd72d3c0a3bad8371b3e16a4aa9f55b30@github.com>

Steve Cornett

unread,
Jun 26, 2026, 1:24:50 PM (2 days ago) Jun 26
to wx-...@googlegroups.com, Subscribed
stevecor left a comment (wxWidgets/wxWidgets#26631)

PR #26635 appears to be a better solution.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26631/c4811827479@github.com>

Steve Cornett

unread,
Jun 26, 2026, 1:24:51 PM (2 days ago) Jun 26
to wx-...@googlegroups.com, Subscribed

Closed #26631.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26631/issue_event/27256685004@github.com>

Reply all
Reply to author
Forward
0 new messages