diff --git a/src/musikbox/app/layout/LibraryLayout.cpp b/src/musikbox/app/layout/LibraryLayout.cpp index 19c0654b2..c8817de32 100755 --- a/src/musikbox/app/layout/LibraryLayout.cpp +++ b/src/musikbox/app/layout/LibraryLayout.cpp @@ -113,7 +113,7 @@ void LibraryLayout::ChangeMainLayout(std::shared_ptr newLa this->visibleLayout->SetFocusMode(ILayout::FocusModeTerminating); if (this->IsVisible()) { - this->BringToTop(); + this->visibleLayout->BringToTop(); } this->OnLayoutChanged(); diff --git a/src/musikbox/app/layout/MainLayout.cpp b/src/musikbox/app/layout/MainLayout.cpp index 42dde52bb..03888b9e5 100755 --- a/src/musikbox/app/layout/MainLayout.cpp +++ b/src/musikbox/app/layout/MainLayout.cpp @@ -70,6 +70,7 @@ void MainLayout::OnLayout() { if (this->layout) { this->layout->MoveAndResize(0, 0, cx, cy - 1); this->layout->Show(); + this->layout->BringToTop(); if (this->shortcutsFocused) { this->layout->SetFocus(IWindowPtr()); diff --git a/src/musikbox/cursespp/Window.cpp b/src/musikbox/cursespp/Window.cpp index 9ce7f27f7..bce9653d9 100755 --- a/src/musikbox/cursespp/Window.cpp +++ b/src/musikbox/cursespp/Window.cpp @@ -395,12 +395,21 @@ void Window::Recreate() { } void Window::OnParentVisibilityChanged(bool visible) { - if (!visible && this->isVisible && this->framePanel) { - this->Destroy(); + if (!visible && this->isVisible) { + if (this->framePanel) { + this->Destroy(); + } + this->OnVisibilityChanged(false); } - else if (visible && this->isVisible && !this->framePanel) { - this->Recreate(); + else if (visible && this->isVisible) { + if (this->framePanel) { + this->Redraw(); + } + else { + this->Recreate(); + } + this->OnVisibilityChanged(true); } }