summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-31 20:33:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-09-01 09:51:35 +0200
commita21d29e77af57758c2fb54e1592db3d7ed675f2a (patch)
tree72b2a60540a16dff8e849da6533bd861dc721f3c /vcl/unx
parent739f3bb7228fa8c33029af46093b4646f848814b (diff)
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 <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx6
1 files changed, 5 insertions, 1 deletions
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))));