# Visibility issue Ableton Live

**URL:** <https://forum.juce.com/t/visibility-issue-ableton-live/31153>\
**Category:** General JUCE discussion\
**Created:** [January 7, 2019, 1:58pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153 "2019-01-07T13:58:18Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Achder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/achder/32/5897_2.png) [@Achder](https://forum.juce.com/u/Achder)\
**Post date:** [January 7, 2019, 1:58pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/1 "2019-01-07T13:58:18Z")

</div>

Hey dear members,

I actually don’t know if the following also occurs in other DAWs but I can’t test other DAWs right now. Following steps create the problem:

- open the plugin editor of my synthesizer.
- without closing select another track.

The plugin editor won’t get closed and JUCE reports the windows as being visible. So in the background it still gets redrawn even though I can’t see it. I see why it won’t get closed but why is it still visible?  
Our synthesizer uses animations when playing a note. If you arm multiple tracks they all get redrawn in the background without the need for it. Is it possible to detect whether the plugin window gets hidden in this way? Like I said, Juce reports it to be visible.

Best,  
Thomas

---

<div class="post-metadata">

**Author:** ![lalala](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/lalala/32/8577_2.png) [@lalala](https://forum.juce.com/u/lalala)\
**Post date:** [January 8, 2019, 9:06am UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/2 "2019-01-08T09:06:52Z")

</div>

> [@Achder](#):
>
> Juce reports it to be visible

with `isShowing()` ?

---

<div class="post-metadata">

**Author:** ![Achder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/achder/32/5897_2.png) [@Achder](https://forum.juce.com/u/Achder)\
**Post date:** [January 8, 2019, 12:48pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/3 "2019-01-08T12:48:12Z")

</div>

isShowing() also returns true.

---

<div class="post-metadata">

**Author:** ![Achder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/achder/32/5897_2.png) [@Achder](https://forum.juce.com/u/Achder)\
**Post date:** [January 10, 2019, 9:53am UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/4 "2019-01-10T09:53:26Z")

</div>

Can anybody confirm this?

---

<div class="post-metadata">

**Author:** ![Achder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/achder/32/5897_2.png) [@Achder](https://forum.juce.com/u/Achder)\
**Post date:** [February 1, 2019, 4:27pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/5 "2019-02-01T16:27:49Z")

</div>

This is still a problem!  
Again, it happens like this:

- Open a plugin editor.
- Select another track.

The plugin is now not visible anymore but it will still get repainted in the background (a timer triggers frequent repaints in our oscilloscope. Animations are used, when notes are played). This is a problem if multiple instances of our plugin are opened like this. I printed the following debug messages (TLC being the top level component):

> Editor: Is visible: yes  
> Editor: Is showing: yes  
> Editor: Is on desktop: no  
> TLC: Is visible: yes  
> TLC: Is showing: yes  
> TLC: Is on desktop: yes  
> Peer: Is minimised: no

I also set a breakpoint in the NSViewComponentPeers toBehind() method, but that is never entered. I would expect the editor not to paint anything when the window is not actually visible.

---

<div class="post-metadata">

**Author:** ![HowardAntares](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/howardantares/32/4629_2.png) [@HowardAntares](https://forum.juce.com/u/HowardAntares)\
**Post date:** [February 1, 2019, 5:35pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/6 "2019-02-01T17:35:34Z")

</div>

Just a guess, but perhaps the window is simply _behind_ other windows? That would still be considered visible. It’s up to the DAW how they handle their plugins’ windows, and whether they close the windows, minimize them, or simply push them behind the main window. Some DAWs have a setting that keeps plugin windows “on top”, so that the main window never obscures them like that. I don’t personally know of any way to test if _any_ portion of a window is showing or not, which is what you’d need to know if you wanted to test if any drawing will ever be needed. (Assuming that’s what you’re looking to determine, in order to reduce redrawing?)

---

<div class="post-metadata">

**Author:** ![Achder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/achder/32/5897_2.png) [@Achder](https://forum.juce.com/u/Achder)\
**Post date:** [February 1, 2019, 5:41pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/7 "2019-02-01T17:41:53Z")

</div>

Yes, I want to stop any redraws, when the window is not visible. Here is a small gif, that shows the behaviour. I select an empty midi track and the window is gone. The redraw is still happening.

 ![36](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/2/228f67b10afed467de873f7d05308713a609873d.gif)

---

<div class="post-metadata">

**Author:** ![HowardAntares](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/howardantares/32/4629_2.png) [@HowardAntares](https://forum.juce.com/u/HowardAntares)\
**Post date:** [February 1, 2019, 6:58pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/8 "2019-02-01T18:58:18Z")

</div>

Unfortunately, I don’t know any way to prevent that. I saw a couple of threads about redrawing to hidden windows, which seemed to indicate an Apple change back in El Capitan that led to this, but haven’t seen a solution or indication that Apple fixed it. Windows that have no visible areas should just not ever get redraw messages, I would expect. But if they do, then what are we, as plug-in developers, expected to do about it? It just doesn’t seem reasonable to have us making platform-specific calls to test if any portion of our plug-in’s parent window is visible or not. Anyone know if there is a reasonable fix for this behavior?

---

<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:** [February 2, 2019, 9:57am UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/9 "2019-02-02T09:57:14Z")

</div>

I can confirm this is happening for our plug-in too with JUCE 5.4.1

---

<div class="post-metadata">

**Author:** ![Achder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/achder/32/5897_2.png) [@Achder](https://forum.juce.com/u/Achder)\
**Post date:** [February 12, 2019, 10:52am UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/10 "2019-02-12T10:52:34Z")

</div>

Could anybody from the Juce team join in on this?

---

<div class="post-metadata">

**Author:** ![asimilon](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/asimilon/32/4235_2.png) [@asimilon](https://forum.juce.com/u/asimilon)\
**Post date:** [February 13, 2019, 5:34pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/11 "2019-02-13T17:34:52Z")

</div>

I have a 2nd window that is required to be “always on top” otherwise it is always behind the main plugin window in Live. But then when Live hides the main plugin window my secondary window is remaining on screen (always on top of every other window!). This is a quite a pain. Knowing when the main plugin window has been hidden by Live would be incredibly useful in this situation too.

---

<div class="post-metadata">

**Author:** ![Achder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/achder/32/5897_2.png) [@Achder](https://forum.juce.com/u/Achder)\
**Post date:** [February 19, 2019, 9:50am UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/12 "2019-02-19T09:50:26Z")

</div>

I know, this is annoying, but I would at least like to get an opinion from the JUCE devs on this. I’d like to dig into fixing this. But I don’t know where to look. Is it realistic that this even can be fixed?

---

<div class="post-metadata">

**Author:** ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)\
**Post date:** [February 19, 2019, 12:15pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/13 "2019-02-19T12:15:51Z")

</div>

As Howard suggested - you’re at the mercy of the DAW here. Probing the window order is likely to be very difficult, but perhaps not impossible. If you find something that works (and isn’t completely horrible) then we’ll gladly incorporate it…

If you can avoid opening additional windows from your plug-in then I would strongly suggest you go the single-window route, _especially_ if you’re doing something like running a modal loop. This is almost guaranteed to cause problems similar to this.

---

<div class="post-metadata">

**Author:** ![Achder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/achder/32/5897_2.png) [@Achder](https://forum.juce.com/u/Achder)\
**Post date:** [February 19, 2019, 12:30pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/14 "2019-02-19T12:30:08Z")

</div>

I think there is a misunderstanding here. I only have one plugineditor. The problem is when the user instantiates more then one editor in different tracks. Live somehow hides the other instances, when I select another track. I’d like to stop those hidden plugineditors from repainting, even though they are not visible anywhere. I don’t think that’s a problem of window order as seen in the gif.

---

<div class="post-metadata">

**Author:** ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)\
**Post date:** [February 19, 2019, 12:35pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/15 "2019-02-19T12:35:51Z")

</div>

There’s no misunderstanding, just a poorly worded post from myself. Substitute “window order” with “window management”.

---

<div class="post-metadata">

**Author:** ![Achder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/achder/32/5897_2.png) [@Achder](https://forum.juce.com/u/Achder)\
**Post date:** [February 19, 2019, 12:37pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/16 "2019-02-19T12:37:37Z")

</div>

That was in reference to the additional windows which I don’t have. But ok. Maybe I have to live with it.

---

<div class="post-metadata">

**Author:** ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)\
**Post date:** [February 19, 2019, 12:40pm UTC](https://forum.juce.com/t/visibility-issue-ableton-live/31153/17 "2019-02-19T12:40:21Z")

</div>

… and that was a response to richie who spoke about having an additional window in the post immediately before yours.
