Disabled subwindows

Hi!, I have an application with multiple subwindows added to the main UI.
I am trying to make a child window which is model only to the parent.

ex.
window A opens modal B, which disables window A
window C opens modal D, which disables window C

I use window.setEnabled(false) to disable parent window.

The problem is that when I disable a window, it can still
be clicked, which brings it to front, which is not what I expected.
Is there a way to disable/block that behavior?

I’ve tried to add focusListener and blurListener on the parent with child.focus() but
events on disabled windows are ignored.

To my mind, if there is an action on the UI side (bringing element to front),
there should be a listener that could add additional action (in my case
focusing the child window).