diff --git a/src/app/script/dialog_class.cpp b/src/app/script/dialog_class.cpp index 088905904..8afc79bf2 100644 --- a/src/app/script/dialog_class.cpp +++ b/src/app/script/dialog_class.cpp @@ -80,6 +80,7 @@ protected: if (m_handTool && Editor::activeEditor()) { enableHandTool(true); } + WindowWithHand::onOpen(ev); } void onBeforeClose(CloseEvent& ev) override { diff --git a/src/ui/window.cpp b/src/ui/window.cpp index fb5547051..1e1d616ab 100644 --- a/src/ui/window.cpp +++ b/src/ui/window.cpp @@ -719,8 +719,11 @@ void Window::onSetText() void Window::onVisible(bool visible) { Widget::onVisible(visible); - if (get_multiple_displays() && m_display) { - display()->nativeWindow()->setVisible(visible); + Display* display = this->display(); + if (ownDisplay() && + display && + display->nativeWindow()) { + display->nativeWindow()->setVisible(visible); } }