summaryrefslogtreecommitdiff
path: root/sd/source/ui/annotations
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-07-13 23:49:48 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-07-14 05:20:04 +0200
commit45d8c51610ce8e8989961135249af0b89544c094 (patch)
tree3ff3554585baa30bbb74183508d9084c4fcd55de /sd/source/ui/annotations
parentccc3996cfcbebe14e9d5f3511906cfc64ddf3452 (diff)
annot: simplifx getting the proper window for popup
Change-Id: Ic9e01d57137ddfbb6f4ec741a275b579741675a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170428 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd/source/ui/annotations')
-rw-r--r--sd/source/ui/annotations/AnnotationPopup.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/sd/source/ui/annotations/AnnotationPopup.cxx b/sd/source/ui/annotations/AnnotationPopup.cxx
index 068d48796302..491f77a7d1aa 100644
--- a/sd/source/ui/annotations/AnnotationPopup.cxx
+++ b/sd/source/ui/annotations/AnnotationPopup.cxx
@@ -74,14 +74,9 @@ void AnnotationPopup::openPopup()
if (!pViewShell)
return;
- auto* pView = pViewShell->GetView();
- if (!pView)
- return;
-
if (!mpAnnotationWindow)
{
- OutputDevice* pOut = pView->GetFirstOutputDevice();
- vcl::Window* pWindow = pOut ? pOut->GetOwnerWindow() : nullptr;
+ vcl::Window* pWindow = pViewShell->GetActiveWindow();
if (pWindow)
{
auto aRealPosition2D = mxAnnotation->getPosition();