Apply workaround to mask issues with repainting some controls (PR #22987)

106 views
Skip to first unread message

AW

unread,
Nov 23, 2022, 3:07:17 PM11/23/22
to wx-...@googlegroups.com, Subscribed

This is related to issue #22629.


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

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

Commit Summary

  • 131d53c Apply workaround to mask issues with repainting some controls

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987@github.com>

VZ

unread,
Dec 3, 2022, 7:02:05 PM12/3/22
to wx-...@googlegroups.com, Subscribed

@a-wi should we merge this or do you still plan to make any changes here?


Reply to this email directly, view it on GitHub, or unsubscribe.

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

AW

unread,
Dec 4, 2022, 3:06:17 AM12/4/22
to wx-...@googlegroups.com, Subscribed

I'm done with this workaround.
Any feedback from those who could reproduce the issue #22629 (@whalley, @codesquid) would be welcome.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

Mark Whalley

unread,
Dec 4, 2022, 4:47:55 AM12/4/22
to wx-...@googlegroups.com, Subscribed

Apologies for delay in testing. I'm away at present so will have to look at this after the 12th Dec.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

AW

unread,
Dec 7, 2022, 12:17:15 PM12/7/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • bac6e90 Apply workaround to mask issues with repainting some controls


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/11917400061@github.com>

AW

unread,
Dec 14, 2022, 12:17:49 PM12/14/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • e6309ac Debug: Display coordinates of bounding box


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/11998393857@github.com>

AW

unread,
Dec 14, 2022, 12:21:45 PM12/14/22
to wx-...@googlegroups.com, Push

@a-wi pushed 2 commits.

  • c94693e Apply workaround to mask issues with repainting some controls
  • f5f2d3d Debug: Display coordinates of bounding box


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/11998437312@github.com>

AW

unread,
Dec 14, 2022, 1:42:57 PM12/14/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • f708aa8 Debug: Display coordinates of bounding box


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/11999252414@github.com>

AW

unread,
Dec 15, 2022, 11:44:17 AM12/15/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • 05fb116 Fix resetting clipping region in wxMacCoreGraphicsContext


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12010775970@github.com>

AW

unread,
Dec 15, 2022, 12:22:38 PM12/15/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • de8fed7 Fix resetting clipping region in wxMacCoreGraphicsContext


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12011189154@github.com>

AW

unread,
Dec 15, 2022, 12:52:54 PM12/15/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • a469f6d Fix resetting clipping region in wxMacCoreGraphicsContext


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12011495487@github.com>

AW

unread,
Dec 16, 2022, 3:08:37 PM12/16/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • 74379b7 Restore font after calling CGContextResetClip()


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12024542378@github.com>

AW

unread,
Dec 19, 2022, 2:40:58 PM12/19/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • 7ec3718 Restore more graphics context attributes after calling CGContextResetClip()


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12046929340@github.com>

AW

unread,
Dec 20, 2022, 1:22:58 PM12/20/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • cb7819d Restore even more graphics context attributes after calling CGContextResetClip()


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12058491309@github.com>

AW

unread,
Dec 29, 2022, 9:02:16 AM12/29/22
to wx-...@googlegroups.com, Push

@a-wi pushed 5 commits.

  • 8b7bf96 Don't restore some graphics context attributes after calling CGContextResetClip()
  • b3b4255 Log font info for drawn text
  • 751a92c Log font info while drawing text of wxTreeCtrl items
  • 560fe96 Log more info about wxTreeCtrl item
  • 8e6c80f Merge branch 'master' into reset_clip_workaround


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12131410952@github.com>

AW

unread,
Dec 29, 2022, 9:54:07 AM12/29/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • e5b4656 Suppress warnings about unused variables


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12131812891@github.com>

AW

unread,
Dec 29, 2022, 10:44:53 AM12/29/22
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • 28fc648 Suppress warnings about unused variables


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12132200574@github.com>

AW

unread,
Dec 29, 2022, 2:13:35 PM12/29/22
to wx-...@googlegroups.com, Subscribed

@whalley
Since restoring graphics context attributes didn't help so I think next suspect are font settings. It looks like previous (emulated) version of ResetClip() masked some font issues and new (real) version just revealed them.
I've added some more diagnostic logging to see what are font settings used in wxTreeCtrl and it would be helpful if you could pull new code from this PR, run it in debug mode and check what is logged when you are reproducing the issue.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

VZ

unread,
Jan 13, 2023, 1:12:07 PM1/13/23
to wx-...@googlegroups.com, Subscribed

Could we apply the known to work workaround (there was one, right?) to master before continuing to look for a better one? I think we do need to do at least something to avoid regressions in 3.3.0, don't we?


Reply to this email directly, view it on GitHub, or unsubscribe.

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

Mark Whalley

unread,
Jan 13, 2023, 1:59:57 PM1/13/23
to wx-...@googlegroups.com, Subscribed

Apologies, not had time to spend much more testing on this due to other commitments.... Reverting according to this #22629 (comment) works for me.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

AW

unread,
Jan 13, 2023, 2:56:52 PM1/13/23
to wx-...@googlegroups.com, Subscribed

I we are not in a hurry I wouldn't apply crippled workaround to master. I am going to do more investigations with this issue.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

VZ

unread,
Jan 14, 2023, 8:27:51 AM1/14/23
to wx-...@googlegroups.com, Subscribed

I we are not in a hurry I wouldn't apply crippled workaround to master.

We're not in a hurry (this would need to be fixed before 3.3.0, but I don't know when it's going to happen yet), but I don't like having master broken for longer than necessary, so I'd prefer to apply a workaround which avoids the regression already. Of course, absolutely nothing prevents us from reverting it and applying a better one as soon as it becomes available, so I don't see what we lose here. OTOH having this problem in master for a couple of months already is not ideal IMO.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

AW

unread,
Jan 14, 2023, 11:29:52 AM1/14/23
to wx-...@googlegroups.com, Subscribed

I'm also not comfortable with this issue being open for so long but the catch with this issue is that it's not universally reproducible and it's hard to isolate the root cause. And you know how looks debugging/fixing the issue if you can't reproduce it.
The catch with so called workaround is that this s not a workaround per se but rather a mask hiding the real problem. And it's not a neutral mask because it has side effects. And what is worse we have no idea where the problem lies so this mask would be applied completely blindly. So I maybe having an open issue is not that bad option. At least there is a motivation to do something.
I will try to dig more in a new environment where maybe I would be able to reproduce the issue, for a good start.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

AW

unread,
Jan 18, 2023, 4:35:57 PM1/18/23
to wx-...@googlegroups.com, Push

@a-wi pushed 0 commits.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12329523082@github.com>

AW

unread,
Jan 18, 2023, 4:35:58 PM1/18/23
to wx-...@googlegroups.com, Subscribed

Closed #22987.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

AW

unread,
Jan 18, 2023, 5:15:30 PM1/18/23
to wx-...@googlegroups.com, Subscribed

Reopened #22987.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

AW

unread,
Jan 19, 2023, 11:01:35 AM1/19/23
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • 87d275d Apply workaround to mask issues with repainting wxTreeCtrl on wxOSX


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/push/12339289422@github.com>

AW

unread,
Jan 19, 2023, 1:16:05 PM1/19/23
to wx-...@googlegroups.com, Push

@a-wi pushed 1 commit.

  • 27616ef xApply workaround to mask issues with repainting wxTreeCtrl on wxOSX

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

VZ

unread,
Jan 19, 2023, 3:33:20 PM1/19/23
to wx-...@googlegroups.com, Subscribed

@vadz commented on this pull request.


In src/generic/treectlg.cpp:

> +#ifdef __WXOSX__
+    dc.DestroyClippingRegion();
+#endif // __WXOSX__

This is really weird, where is this clipping region set? We only use wxDCClipper in this file itself, so how can we have any clipping region here?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/22987/review/1262582000@github.com>

AW

unread,
Jan 20, 2023, 3:19:00 AM1/20/23
to wx-...@googlegroups.com, Subscribed

@a-wi commented on this pull request.


In src/generic/treectlg.cpp:

> +#ifdef __WXOSX__
+    dc.DestroyClippingRegion();
+#endif // __WXOSX__

The issue itself is weird - how is it possible that call to native CGContextResetClip(() impacts font weight - so the workaround is weird too.
But this is still experiment, so maybe in the next turn something less weird will be found.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

AW

unread,
Jan 22, 2023, 12:33:05 PM1/22/23
to wx-...@googlegroups.com, Subscribed

Won't be implemented.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

AW

unread,
Jan 22, 2023, 12:33:05 PM1/22/23
to wx-...@googlegroups.com, Subscribed

Closed #22987.


Reply to this email directly, view it on GitHub, or unsubscribe.

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

Reply all
Reply to author
Forward
0 new messages