diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-05-29 23:33:25 -0400 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-12-18 01:50:41 +0100 |
commit | c2f8929ed76085bc81f390f90e06bd6781206537 (patch) | |
tree | 57861cb7462411f16a4eff3705616e23d97846df /vcl/source/window/floatwin.cxx | |
parent | 9e63d328691014bc97f6b66b708ed9dec53618e6 (diff) |
vcl: sfx2: LOK: Support per-view popup windows
While we do support multiple views, there is only
one state for popup/floating windows, that also
includes the dialogs open and related windows/data.
This adds support to allow each view to have its own
popups and state, thus allowing multiple users to
interact with the dialogs independently of one
another.
(cherry picked from commit b50c341a53911f1d725947a4d8d3d2f782c94079)
Change-Id: I3786a561ca6ca113ad12425bdb491e5a30bd1a28
Reviewed-on: https://gerrit.libreoffice.org/82440
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/85221
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/source/window/floatwin.cxx')
-rw-r--r-- | vcl/source/window/floatwin.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index e3abe5dcd169..d4998f82c8e9 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -65,7 +65,7 @@ void FloatingWindow::ImplInitFloating( vcl::Window* pParent, WinBits nStyle ) SAL_WARN_IF(!pParent, "vcl", "FloatWindow::FloatingWindow(): - pParent == NULL!"); if (!pParent) - pParent = ImplGetSVData()->maWinData.mpAppWin; + pParent = ImplGetSVData()->maFrameData.mpAppWin; SAL_WARN_IF(!pParent, "vcl", "FloatWindow::FloatingWindow(): - pParent == NULL and no AppWindow exists"); @@ -391,7 +391,7 @@ Point FloatingWindow::ImplCalcPos(vcl::Window* pWindow, default: break; } - // no further adjustment for LibreOfficeKit + // no further adjustement for LibreOfficeKit if (bLOKActive) break; @@ -768,8 +768,8 @@ void FloatingWindow::StartPopupMode( const tools::Rectangle& rRect, FloatWinPopu // add FloatingWindow to list of windows that are in popup mode ImplSVData* pSVData = ImplGetSVData(); - mpNextFloat = pSVData->maWinData.mpFirstFloat; - pSVData->maWinData.mpFirstFloat = this; + mpNextFloat = pSVData->mpWinData->mpFirstFloat; + pSVData->mpWinData->mpFirstFloat = this; if (nFlags & FloatWinPopupFlags::GrabFocus) { // force key input even without focus (useful for menus) @@ -826,11 +826,11 @@ void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPt mbInCleanUp = true; // prevent killing this window due to focus change while working with it // stop the PopupMode also for all following PopupMode windows - while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat.get() != this ) - pSVData->maWinData.mpFirstFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel ); + while (pSVData->mpWinData->mpFirstFloat && pSVData->mpWinData->mpFirstFloat.get() != this) + pSVData->mpWinData->mpFirstFloat->EndPopupMode(FloatWinPopupEndFlags::Cancel); // delete window from the list - pSVData->maWinData.mpFirstFloat = mpNextFloat; + pSVData->mpWinData->mpFirstFloat = mpNextFloat; mpNextFloat = nullptr; FloatWinPopupFlags nPopupModeFlags = mnPopupModeFlags; @@ -846,11 +846,11 @@ void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPt // restore focus to previous focus window if we still have the focus Window::EndSaveFocus(xFocusId); } - else if ( pSVData->maWinData.mpFocusWin && pSVData->maWinData.mpFirstFloat && - ImplIsWindowOrChild( pSVData->maWinData.mpFocusWin ) ) + else if ( pSVData->mpWinData->mpFocusWin && pSVData->mpWinData->mpFirstFloat && + ImplIsWindowOrChild( pSVData->mpWinData->mpFocusWin ) ) { // maybe pass focus on to a suitable FloatingWindow - pSVData->maWinData.mpFirstFloat->GrabFocus(); + pSVData->mpWinData->mpFirstFloat->GrabFocus(); } mbPopupModeCanceled = bool(nFlags & FloatWinPopupEndFlags::Cancel); @@ -878,9 +878,9 @@ void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPt { if ( !(nPopupModeFlags & FloatWinPopupFlags::NewLevel) ) { - if ( pSVData->maWinData.mpFirstFloat ) + if (pSVData->mpWinData->mpFirstFloat) { - FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat(); + FloatingWindow* pLastLevelFloat = pSVData->mpWinData->mpFirstFloat->ImplFindLastLevelFloat(); pLastLevelFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll ); } } |