vcl/unx/gtk3/gtkinst.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a21d29e77af57758c2fb54e1592db3d7ed675f2a
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Aug 31 20:33:45 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Sep 1 09:51:35 2022 +0200

    tdf#150723 "run" will make the dialog visible like "show"
    
    so make run drop m_aPosWhileInvis like show
    
    Change-Id: Id7c024c487baaa0b2fd9500888e953b9b808921d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139134
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 19372ab78446..326c1aa9ee27 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -6117,8 +6117,9 @@ class GtkInstanceWindow : public GtkInstanceContainer, 
public virtual weld::Wind
 private:
     GtkWindow* m_pWindow;
     rtl::Reference<SalGtkXWindow> m_xWindow; //uno api
-    std::optional<Point> m_aPosWhileInvis; //tdf#146648 store last known 
position when visible to return as pos if hidden
     gulong m_nToplevelFocusChangedSignalId;
+protected:
+    std::optional<Point> m_aPosWhileInvis; //tdf#146648 store last known 
position when visible to return as pos if hidden
 
 #if !GTK_CHECK_VERSION(4, 0, 0)
     static void implResetDefault(GtkWidget *pWidget, gpointer user_data)
@@ -9881,6 +9882,9 @@ void GtkInstanceDialog::asyncresponse(gint ret)
 
 int GtkInstanceDialog::run()
 {
+    // tdf#150723 "run" will make the dialog visible so drop m_aPosWhileInvis 
like show
+    m_aPosWhileInvis.reset();
+
 #if !GTK_CHECK_VERSION(4, 0, 0)
     if (GTK_IS_DIALOG(m_pDialog))
         
sort_native_button_order(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(m_pDialog))));

Reply via email to