diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-03 12:37:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-07 09:54:39 +0200 |
commit | 5e8d51ca7b597eeaf9f8cfbb1c97e8ab51b030a8 (patch) | |
tree | 438b8eb3a9d442d9ead685f9e8aceae9b9a139d4 /vcl | |
parent | 65420c21194a28aeead0238838028b734b663d87 (diff) |
tdf#125079 turn off GTK_WIN_POS_CENTER_ON_PARENT after a while
Change-Id: Ib268a6b32257aee812e5bae27a6db94431d2abbb
Reviewed-on: https://gerrit.libreoffice.org/71739
Tested-by: Jenkins
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 4ed1d96158e4..6a7f3ab5c5d7 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -984,7 +984,7 @@ public: return m_xWindow->GetPosPixel(); } - virtual void set_centered_on_parent_geometry_request() override + virtual void set_centered_on_parent(bool /*bTrackGeometryRequests*/) override { if (vcl::Window* pParent = m_xWidget->GetParent()) { diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index b1c7cf963d3f..bb1803828ffa 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -2582,9 +2582,12 @@ public: return Point(current_x, current_y); } - virtual void set_centered_on_parent_geometry_request() override + virtual void set_centered_on_parent(bool bTrackGeometryRequests) override { - gtk_window_set_position(m_pWindow, GTK_WIN_POS_CENTER_ALWAYS); + if (bTrackGeometryRequests) + gtk_window_set_position(m_pWindow, GTK_WIN_POS_CENTER_ALWAYS); + else + gtk_window_set_position(m_pWindow, GTK_WIN_POS_CENTER_ON_PARENT); } virtual bool get_resizable() const override |