void (AWTEvent event) { Object source = event == null ? null : event.getSource(); if (source instanceof Window) { for (Container c = (Window)source; c instanceof Window && c instanceof RootPaneContainer; c = c.getParent()) { JRootPane root = ((RootPaneContainer)c).getRootPane(); if (root != null) { Component pane = root.getGlassPane(); if (pane instanceof IdeGlassPaneImpl) { WindowShadowPainter painter = (WindowShadowPainter)((IdeGlassPaneImpl)pane).getWindowShadowPainter$intellij_platform_ide_impl(); if (painter != null && pane == painter.myComponent) { List<Rectangle> shadows = painter.myShadows; painter.myShadows = getShadows(pane, (Window)c); if (!Objects.equals(painter.myShadows, shadows)) pane.repaint(); } } } } } }