summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2022-01-15 17:44:31 -0900
committerCaolán McNamara <caolanm@redhat.com>2022-01-26 16:05:06 +0100
commit3bf0f94b373037fc662e617f936b57f9f317b142 (patch)
treefb543ddeefd013247c51d5b629071748aa6e2ab9
parent65564103f619aa75eb1d1872546af78caf3144b6 (diff)
tdf#146648 make find and replace dialog reopen at last position
Makes the find and replace dialog reopen at the position it is closed/ canceled. this may have begun to go wrong for X11 at: commit 8e2398bf72507324718e99fb2066c068c7898bf8 Date: Thu Jul 21 16:00:30 2011 +0200 Remove supportsICCCMPos. Resize working with Sawfish anyway. Change-Id: I7bdcf5cd53dba8f3aacb1f2d1ae24f4bbcee26d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128473 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sfx2/source/appl/childwin.cxx4
-rw-r--r--vcl/unx/generic/window/salframe.cxx13
2 files changed, 13 insertions, 4 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 944fe47ed64a..ae8e7c35ad71 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -38,6 +38,8 @@
#include <sfx2/dispatch.hxx>
#include <workwin.hxx>
+#include <sfx2/sfxsids.hrc>
+
const sal_uInt16 nVersion = 2;
SfxChildWinFactory::SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID,
@@ -236,7 +238,7 @@ std::unique_ptr<SfxChildWindow> SfxChildWindow::CreateChildWindow( sal_uInt16 nI
{
if ( pBindings )
pBindings->ENTERREGISTRATIONS();
- SfxChildWinInfo aInfo = rFactInfo;
+ SfxChildWinInfo aInfo = nId == SID_SEARCH_DLG ? rInfo : rFactInfo;
Application::SetSystemWindowMode( SystemWindowFlags::NOAUTOMODE );
pChild = pFact->pCtor( pParent, nId, pBindings, &aInfo );
Application::SetSystemWindowMode( nOldMode );
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 00fd74693c9f..70803c7353e4 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -1676,14 +1676,18 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
if ((pState->mnMask & FRAMESTATE_MASK_GEOMETRY) != FRAMESTATE_MASK_GEOMETRY)
GetPosSize (aPosSize);
+ sal_uInt16 nPosFlags = 0;
+
// change requested properties
if (pState->mnMask & WindowStateMask::X)
{
- aPosSize.SetPosX (pState->mnX);
+ aPosSize.SetPosX(pState->mnX - (mpParent ? mpParent->maGeometry.nX : 0));
+ nPosFlags |= SAL_FRAME_POSSIZE_X;
}
if (pState->mnMask & WindowStateMask::Y)
{
- aPosSize.SetPosY (pState->mnY);
+ aPosSize.SetPosY(pState->mnY - (mpParent ? mpParent->maGeometry.nY : 0));
+ nPosFlags |= SAL_FRAME_POSSIZE_Y;
}
if (pState->mnMask & WindowStateMask::Width)
{
@@ -1732,7 +1736,10 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
aPosSize.Move( 0, static_cast<tools::Long>(aGeom.nTopDecoration) - aPosSize.Top() );
}
- SetPosSize( 0, 0, aPosSize.GetWidth(), aPosSize.GetHeight(), SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
+ SetPosSize(aPosSize.getX(), aPosSize.getY(),
+ aPosSize.GetWidth(), aPosSize.GetHeight(),
+ SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT |
+ nPosFlags);
}
}