Detect whether or not the UI is covered by a modal window

Hi guys,

Is there a way to detect whether or not the UI is covered by a modal window (the UI is grayed)?

The background of my question is that I use the Refresher add-on to refresh the UI perodically.
However I want to suspend this as soon as the user interacts with the UI (in my case opens a modal pop up).

Thanks
Markus

for(Window win : UI.getCurrent().getWindows()){ if(win.isModal()) return true; } return false; will this work for you?

Thanks, that works as far as opened windows are concerned.

However, I detected that I also need to detect, whether or not a drop-down (ComboBox) is opened, etc.

So, the ideal solution would be to be able to detect, whether or not “something” is overlapping a certain region of the UI.

Thanks
Markus