Life demo: repaint clicked cells instead of drawing on a wxClientDC (PR #26922)

14 views
Skip to first unread message

Gunter Königsman

unread,
Aug 25, 2026, 8:02:17 AM (3 days ago) Aug 25
to wx-...@googlegroups.com, Subscribed

When porting wxWidgets to GTK4 Claude reckons to have found 6 bugs in wxWidgets that hinder samples, example applications or tests from working. I currently push them as separate pull requests so they can be individually reviewed. In this case the review might be a good thing as everything points at this being the right solution but both claude and I might miss a thing and the repaint should be triggered by wxWidgets, after all.

Clicking or dragging in the Life canvas updated the Life object but drew the affected cells straight onto a wxClientDC. Where that does not work the population counter went up while the grid stayed unchanged, and the cells only appeared once something else forced a repaint -- resizing the window, for instance.

wxClientDC::CanBeUsedForDrawing() reports false under GTK+ 3 on Wayland, on the macOS port and under Qt, so this is not specific to any one platform; the demo simply never asked.

Refresh the affected cell's rectangle instead and let the existing paint handler draw it from the Life object, which is where every other update to the grid already comes from.

(cherry picked from commit de2465b)


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

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

Commit Summary

  • 6f65892 Life demo: repaint clicked cells instead of drawing on a wxClientDC

File Changes

(2 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/26922@github.com>

VZ

unread,
Aug 26, 2026, 11:25:17 AM (yesterday) Aug 26
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26922)

This is a good change, thanks!


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/26922/c5427466635@github.com>

VZ

unread,
Aug 26, 2026, 1:29:21 PM (yesterday) Aug 26
to wx-...@googlegroups.com, Subscribed

Closed #26922 via 0571606.


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/26922/issue_event/30058104738@github.com>

Reply all
Reply to author
Forward
0 new messages