# Different dirty region repaint behavior on similar machines

**URL:** <https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800>\
**Category:** General JUCE discussion\
**Created:** [April 9, 2024, 9:26am UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800 "2024-04-09T09:26:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![luzifer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/luzifer/32/60_2.png) [@luzifer](https://forum.juce.com/u/luzifer)\
**Post date:** [April 9, 2024, 9:26am UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800/1 "2024-04-09T09:26:58Z")

</div>

i get very different repaint behaviors on quite similar machines: both MacBook Pro M1.  
i modified the WidgetsDemo of a vanilla JUCE checkout to flash one component in random colors when it is being repainted. on one machine the entire window with all its components is redrawn if one component is marked dirty. on the other machine – as expected – only components within the dirty region are repainted.  
did anyone experience similar behavior? could i have changed a setting ages ago and have forgot about it?

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 9, 2024, 9:46am UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800/2 "2024-04-09T09:46:26Z")

</div>

> [@luzifer](#):
>
> both MacBook Pro M1

- Are the OS versions the same?
- Are the displays the same, i.e. using the internal display in both cases?
- Is the system display scaling setting the same on both machines?
- Are you building the program separately on each machine? Do you get different results if you copy and run exactly the same binary on each machine (i.e. build on one machine and copy to the other)?

---

<div class="post-metadata">

**Author:** ![luzifer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/luzifer/32/60_2.png) [@luzifer](https://forum.juce.com/u/luzifer)\
**Post date:** [April 10, 2024, 8:39am UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800/3 "2024-04-10T08:39:10Z")

</div>

thanks for your fast reply!

- OS versions differ only in minor release: 14.4.1 (on the machine with confined repaints) vs. 14.2.1 on the other. however i’m pretty sure the behavior was there before some updates
- displays are the same
- scaling is the same
- i tried running the executable that does work fine on one machine on the broken one and it stays broken  
what’s more: when investigating with Quartz Debug it seems any JUCE application exhibits this. i’ve tried it now with PaulXStretch and DecentSampler

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [April 10, 2024, 11:08am UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800/4 "2024-04-10T11:08:31Z")

</div>

Yes, we’ve seen this as well. The whole window gets repainted for any repaint call.  
Only happened on Jules’s machine though, not mine. Never got the the bottom of it.

---

<div class="post-metadata">

**Author:** ![zsliu98](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/zsliu98/32/22502_2.png) [@zsliu98](https://forum.juce.com/u/zsliu98)\
**Post date:** [April 10, 2024, 12:02pm UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800/5 "2024-04-10T12:02:42Z")

</div>

Might related:

> [@setNeedsDisplayInRect broken on Sonoma?](https://forum.juce.com/t/setneedsdisplayinrect-broken-on-sonoma/58476):
>
> I filed an apple bug on this, and to be clear I don’t think it is a Juce bug at all, but I figured I would post the details here and see if the Juce team or anyone else has any more information about the situation that might be helpful. It appears that in Sonoma, setNeedsDisplayInRect ignores the rect you pass it. The resulting drawRect: seems to always include the entire bounds of the NSView. In a juce based app - where likely we will have one NSView for the whole window - this results in re…

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 10, 2024, 12:02pm UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800/6 "2024-04-10T12:02:49Z")

</div>

> [@dave96](#):
>
> Never got the the bottom of it.

That doesn’t bode well!

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 10, 2024, 12:04pm UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800/7 "2024-04-10T12:04:31Z")

</div>

Yes, this does look similar, especially if the issue is only present on the 14.2 machine, and not on 14.4. The issue in the linked post was a macOS bug fixed in 14.3:

> [@setNeedsDisplayInRect broken on Sonoma?](https://forum.juce.com/t/setneedsdisplayinrect-broken-on-sonoma/58476/17):
>
> And indeed, this issue now seems to be fixed as of 14.3 tada

---

<div class="post-metadata">

**Author:** ![luzifer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/luzifer/32/60_2.png) [@luzifer](https://forum.juce.com/u/luzifer)\
**Post date:** [April 10, 2024, 12:28pm UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800/8 "2024-04-10T12:28:00Z")

</div>

ah cool. would be great if it is just this. will update my machine next week and report back!

---

<div class="post-metadata">

**Author:** ![luzifer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/luzifer/32/60_2.png) [@luzifer](https://forum.juce.com/u/luzifer)\
**Post date:** [April 15, 2024, 7:45am UTC](https://forum.juce.com/t/different-dirty-region-repaint-behavior-on-similar-machines/60800/9 "2024-04-15T07:45:40Z")

</div>

i can confirm that after updating to macOS 14.4.1 the problems seem to be fixed. thank you!
