From bbcf587faa73d8ec7242f287421337b247b51cc5 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Tue, 7 Apr 2020 10:31:51 +0200 Subject: lok: Use a different window type for tooltips. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I211cd6bc2249475dbacd80f944e22465b19aff77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91837 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai --- include/LibreOfficeKit/LibreOfficeKitEnums.h | 1 + vcl/source/window/floatwin.cxx | 7 ++++++- vcl/source/window/winproc.cxx | 10 ---------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index 7ef3a3884e92..de547df505ea 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -614,6 +614,7 @@ typedef enum * - "dialog" - window is a dialog * - "child" - window is a floating window (combo boxes, etc.) * - "deck" - window is a docked/floating deck (i.e. the sidebar) + * - "tooltip" - window is a tooltip popup * * "action" can take following values: * - "created" - window is created in the backend, client can render it now diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 0ef5125e92c7..006ac60caaa7 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -653,7 +654,11 @@ void FloatingWindow::StateChanged( StateChangedType nType ) else { SetLOKNotifier(pParent->GetLOKNotifier()); - aItems.emplace_back("type", "child"); + if (dynamic_cast(this)) + aItems.emplace_back("type", "tooltip"); + else + aItems.emplace_back("type", "child"); + aItems.emplace_back("parentId", OString::number(pParent->GetLOKWindowId())); if (mbInPopupMode) aItems.emplace_back("position", mpImplData->maPos.toString()); // pixels diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 8377691e1527..31620bc6a0ac 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -160,16 +160,6 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo static void ImplHandleMouseHelpRequest( vcl::Window* pChild, const Point& rMousePos ) { - if (comphelper::LibreOfficeKit::isActive()) - { - // Ignore tooltips in popup color pallets - // (e.g. Character Properties dialog -> Font Effects -> Font Color) - if(pChild->GetType() == WindowType::CONTROL && - pChild->GetParent() && pChild->GetParent()->GetParent() && - pChild->GetParent()->GetParent()->GetType() == WindowType::SCROLLWINDOW) - return; - } - ImplSVHelpData& aHelpData = ImplGetSVHelpData(); if ( !aHelpData.mpHelpWin || !( aHelpData.mpHelpWin->IsWindowOrChild( pChild ) || -- cgit v1.2.3