include/vcl/vclenum.hxx        |    3 +--
 vcl/source/window/dockmgr.cxx  |   20 ++++----------------
 vcl/source/window/floatwin.cxx |   15 ---------------
 3 files changed, 5 insertions(+), 33 deletions(-)

New commits:
commit 230789766b364bf995e6659dd589cdf902c69f2c
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Aug 17 15:39:10 2023 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Aug 18 06:05:49 2023 +0200

    tdf#156561 tdf#141101 Revert "tdf#140762 tdf#152671 Make dock win ..." et al
    
    Revert
    
        commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Wed Mar 15 17:00:27 2023 +0100
    
            tdf#140762 tdf#152671 Make dock win visible before showing popup
    
    and 2 follow-up commits, since it's no longer necessary to
    have the window visible already when the popup shows in order
    for NVDA on Windows to announce the content.
    
    This unifies the code path between gtk and non-gtk again,
    as already pointed out in
    
        commit 3bb762c53ea79f8915a1b8fa39f3f5f57aa68c84
        Date:   Tue Aug 1 09:44:56 2023 +0200
    
            tdf#156100 tdf#156561 Revert to previous behavior for gtk popups
    
    > Further analysis of the root causes is planned in the context of
    > tdf#156561, so hopefully the code paths can be unified again in
    > the future.
    
    The underlying issues have now been addressed by these
    commits instead now:
    
        commit 1d92445fcac1c51c17d8dbfd1a4017430fe7bc46
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Tue Aug 1 09:26:37 2023 +0100
    
            tdf#156561 wina11y: Handle CHILD event
    
        Change-Id I83cf5732bfc9d4886e4f7fa75d4ff462e4d4af6d
        tdf#141101 tdf#156561 a11y: Handle a11y child events in win parent
    
        Change-Id I69c6066127c8b853a27cc1f692f139572541f8eb
        tdf#156561 a11y: Create VCLXTopWindow peer for border win frame
    
        Change-Id If374032387babf41b28067d5df54d5f6ce682c48
        tdf#156561 a11y: Don't ignore child events in AccessibleListBox
    
        Change-Id Ifbe27de01739103d1da04951475db32aa50d429d
        tdf#156561 svtools, a11y: Return created popup win for focus handling
    
    Together with the above-mentioned commits, this also makes NVDA
    announce the font color popup in the "Character" (character style)
    dialog. (Announcement starts as soon as Tab is pressed once,
    not yet for the initially focused item right away.)
    
    Reverted commits:
    
        commit 3bb762c53ea79f8915a1b8fa39f3f5f57aa68c84
        Date:   Tue Aug 1 09:44:56 2023 +0200
    
            tdf#156100 tdf#156561 Revert to previous behavior for gtk popups
    
        commit 70642bb7afd2cee6f7ae6eff2936a35978bd0597
        Date:   Thu Apr 6 15:07:15 2023 +0100
    
            tdf#154470 try moving the Show of the client to after the float 
positioning
    
        commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb
        Date:   Wed Mar 15 17:00:27 2023 +0100
    
            tdf#140762 tdf#152671 Make dock win visible before showing popup
    
    Change-Id: Ic621b4344311679af2d13b5a80220e1daf411061
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155803
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 4b754d1b66b1..5ea0c77127d6 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -333,11 +333,10 @@ enum class FloatWinPopupFlags
     NoMouseUpClose       = 0x000200,
     GrabFocus            = 0x000400,
     NoHorzPlacement      = 0x000800,
-    MakeClientWindowVisibleBeforePopup  = 0x001000,
 };
 namespace o3tl
 {
-    template<> struct typed_flags<FloatWinPopupFlags> : 
is_typed_flags<FloatWinPopupFlags, 0x1fff> {};
+    template<> struct typed_flags<FloatWinPopupFlags> : 
is_typed_flags<FloatWinPopupFlags, 0x0fff> {};
 }
 
 // Flags for Window::Show()
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index cc122a71dd0d..ba9aa2aa9450 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -821,21 +821,8 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox 
*pParentToolBox, FloatWin
     if( pParentToolBox->IsKeyEvent() )
         nFlags |= FloatWinPopupFlags::GrabFocus;
 
-    // tdf#140762, tdf#152671, tdf#154470, tdf#156100: Without client window 
being visible
-    // before showing popup, at least NVDA on Windows does not announce items 
in the popup,
-    // so make the client window visible first. This is problematic for gtk 
VCL plugins though,
-    // so don't do it there and use different code paths for now.
-    // For further analysis of the root causes, there's tdf#156561.
-    const OUString sToolkit = Application::GetToolkitName();
-    if (sToolkit == "gtk3" || sToolkit == "gtk4")
-    {
-        mpFloatWin->StartPopupMode( pParentToolBox, nFlags);
-        GetWindow()->Show();
-    }
-    else
-    {
-        mpFloatWin->StartPopupMode( pParentToolBox, nFlags | 
FloatWinPopupFlags::MakeClientWindowVisibleBeforePopup);
-    }
+    mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
+    GetWindow()->Show();
 
     if( pParentToolBox->IsKeyEvent() )
     {
@@ -852,7 +839,8 @@ void ImplDockingWindowWrapper::StartPopupMode( const 
tools::Rectangle& rRect, Fl
         return;
 
     ImplPreparePopupMode();
-    mpFloatWin->StartPopupMode( rRect, nFlags | 
FloatWinPopupFlags::MakeClientWindowVisibleBeforePopup);
+    mpFloatWin->StartPopupMode( rRect, nFlags );
+    GetWindow()->Show();
 }
 
 IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd, FloatingWindow*, void)
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 170567f62794..9adcbefda372 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -795,21 +795,6 @@ void FloatingWindow::StartPopupMode( const 
tools::Rectangle& rRect, FloatWinPopu
     SetPosPixel( mpImplData->maPos );
     ImplGetFrame()->PositionByToolkit(rRect, nFlags);
 
-    /*
-    tdf#140762 tdf#152671 Make dock win visible before showing popup
-
-    Make them visible again *before* starting popup mode for the floating
-    window.  This e.g. makes NVDA announce popups in the toolbar or the Calc
-    autofilter dropdown.
-    */
-    if (nFlags & FloatWinPopupFlags::MakeClientWindowVisibleBeforePopup)
-    {
-        if (vcl::Window* pClientWindow = ImplGetClientWindow())
-        {
-            pClientWindow->Show(true, ShowFlags::NoFocusChange | 
ShowFlags::NoActivate);
-        }
-    }
-
     // set data and display window
     // convert maFloatRect to absolute device coordinates
     // so they can be compared across different frames

Reply via email to