void (@NotNull Window window) { try { Object cPlatformWindow = MacUtil.getPlatformWindow(window); if (cPlatformWindow != null) { Class<?> windowClass = cPlatformWindow.getClass(); Method deliverMoveResize = ReflectionUtil.getDeclaredMethod(windowClass, "doDeliverMoveResizeEvent"); if (deliverMoveResize != null) { try { deliverMoveResize.invoke(cPlatformWindow); } catch (Throwable e) { Logger.getInstance(MacWinTabsHandler.class).error(e); } return; } Method javaDeliverMoveResize = ReflectionUtil .getDeclaredMethod(windowClass, "deliverMoveResizeEvent", int.class, int.class, int.class, int.class, boolean.class); if (javaDeliverMoveResize == null) { return; } Rectangle rect = window.getGraphicsConfiguration().getBounds(); Foundation.executeOnMainThread(true, false, () -> { try { javaDeliverMoveResize.invoke(cPlatformWindow, rect.x, rect.y, rect.width, rect.height, true); } catch (Throwable e) { Logger.getInstance(MacWinTabsHandler.class).error(e); } }); } } catch (Throwable e) { Logger.getInstance(MacWinTabsHandler.class).error(e); } }