diff options
-rw-r--r-- | include/vcl/weld.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/qt5/QtInstanceWindow.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/salvtables.hxx | 4 | ||||
-rw-r--r-- | vcl/qt5/QtInstanceWindow.cxx | 4 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 17 |
6 files changed, 8 insertions, 27 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index cc60c8f351e7..cc338544fe3f 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -539,8 +539,6 @@ public: virtual void set_title(const OUString& rTitle) = 0; virtual OUString get_title() const = 0; virtual void window_move(int x, int y) = 0; - virtual void set_modal(bool bModal) = 0; - virtual bool get_modal() const = 0; virtual bool get_resizable() const = 0; virtual Size get_size() const = 0; virtual Point get_position() const = 0; @@ -617,6 +615,8 @@ private: = 0; public: + virtual void set_modal(bool bModal) = 0; + virtual bool get_modal() const = 0; virtual int run() = 0; // Run async without a controller // @param self - must point to this, to enforce that the dialog was created/held by a shared_ptr diff --git a/vcl/inc/qt5/QtInstanceWindow.hxx b/vcl/inc/qt5/QtInstanceWindow.hxx index db80a6e71458..e84a6071b3f0 100644 --- a/vcl/inc/qt5/QtInstanceWindow.hxx +++ b/vcl/inc/qt5/QtInstanceWindow.hxx @@ -19,8 +19,6 @@ public: virtual void set_title(const OUString& rTitle) override; virtual OUString get_title() const override; virtual void window_move(int, int) override; - virtual void set_modal(bool) override; - virtual bool get_modal() const override; virtual bool get_resizable() const override; virtual Size get_size() const override; virtual Point get_position() const override; diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index f7e577ab7808..b42a3f71ebc2 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -475,10 +475,6 @@ public: virtual void resize_to_request() override; - virtual void set_modal(bool bModal) override; - - virtual bool get_modal() const override; - virtual void window_move(int x, int y) override; virtual Size get_size() const override; diff --git a/vcl/qt5/QtInstanceWindow.cxx b/vcl/qt5/QtInstanceWindow.cxx index a915dd373131..a3c6b3de3687 100644 --- a/vcl/qt5/QtInstanceWindow.cxx +++ b/vcl/qt5/QtInstanceWindow.cxx @@ -45,10 +45,6 @@ OUString QtInstanceWindow::get_title() const void QtInstanceWindow::window_move(int, int) {} -void QtInstanceWindow::set_modal(bool) {} - -bool QtInstanceWindow::get_modal() const { return true; } - bool QtInstanceWindow::get_resizable() const { return true; } Size QtInstanceWindow::get_size() const { return Size(); } diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 256586f6b732..d394c462bc61 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1616,10 +1616,6 @@ void resize_to_request(vcl::Window* pWindow) void SalInstanceWindow::resize_to_request() { ::resize_to_request(m_xWindow.get()); } -void SalInstanceWindow::set_modal(bool bModal) { m_xWindow->ImplGetFrame()->SetModal(bModal); } - -bool SalInstanceWindow::get_modal() const { return m_xWindow->ImplGetFrame()->GetModal(); } - void SalInstanceWindow::window_move(int x, int y) { m_xWindow->SetPosPixel(Point(x, y)); } Size SalInstanceWindow::get_size() const { return m_xWindow->GetSizePixel(); } diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 2d7613bb010e..221a580457ab 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -6349,16 +6349,6 @@ public: return m_xWindow; } - virtual void set_modal(bool bModal) override - { - gtk_window_set_modal(m_pWindow, bModal); - } - - virtual bool get_modal() const override - { - return gtk_window_get_modal(m_pWindow); - } - virtual void resize_to_request() override { #if GTK_CHECK_VERSION(4, 0, 0) @@ -7144,7 +7134,7 @@ public: { if (get_modal() == bModal) return; - GtkInstanceWindow::set_modal(bModal); + gtk_window_set_modal(m_pDialog, bModal); /* if change the dialog modality while its running, then also change the parent LibreOffice window modal count, we typically expect the dialog modality to be restored to its original state @@ -7168,6 +7158,11 @@ public: } } + virtual bool get_modal() const override + { + return gtk_window_get_modal(m_pDialog); + } + virtual void response(int nResponse) override; virtual void add_button(const OUString& rText, int nResponse, const OUString& rHelpId) override |