Blob Blame History Raw
From 94341df754fddacefb01638e5c544a5ba66de750 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 16 Dec 2015 21:26:15 +0000
Subject: [PATCH] impress's AnnotationWindow is the only user of WB_NEEDSFOCUS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Here it is creating a toplevel floating system window which needs special
hackery to function.

Instead convert it to a non-system window which means that it is in reality
only a vcl construct. The small downside is that it is now unable to leave the
confines of the toplevel system window in which it lives. Upside is that
all the special hackery related to it which generally doesn't work half the time
in various window managers and now in wayland can go away.

Change-Id: I7ad7c35091086f7671ff4a178c7fa04202c20e09
Reviewed-on: https://gerrit.libreoffice.org/20745
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
 sd/source/ui/annotations/annotationwindow.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index bcad03d..c307f1d 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -273,7 +273,7 @@ Selection AnnotationTextWindow::GetSurroundingTextSelection() const
 /************** AnnotationWindow***********************************++*/
 
 AnnotationWindow::AnnotationWindow( AnnotationManagerImpl& rManager, DrawDocShell* pDocShell, vcl::Window* pParent )
-: FloatingWindow(pParent, WB_SYSTEMWINDOW|WB_BORDER|WB_NEEDSFOCUS)
+: FloatingWindow(pParent, WB_BORDER)
 , mrManager( rManager )
 , mpDocShell( pDocShell )
 , mpView( pDocShell->GetViewShell()->GetView() )
@@ -287,6 +287,7 @@ AnnotationWindow::AnnotationWindow( AnnotationManagerImpl& rManager, DrawDocShel
 , mpTextWindow(0)
 , mpMeta(0)
 {
+    EnableAlwaysOnTop();
 }
 
 AnnotationWindow::~AnnotationWindow()
-- 
2.5.0