Revert "window_opened management"

This reverts commit fb328fd3a3cd59e15da4563577767e76d336ebca.
Revert "window_opened management"

This reverts commit bc8460515b29f341e168ab909a6fb423f57dce9c.