summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-01-25 12:21:12 +0100
committerAndras Timar <andras.timar@collabora.com>2018-03-25 14:08:29 +0200
commit21b9867d78b30c8334be6d38dad48efb744a733f (patch)
treefa988e35c8fb758cfe9a218a4f637904fa074334 /svtools
parentb6c969e17fc42b2764c1ced5e8ba0eaa1e950309 (diff)
tdf#115227 svtools: suppress UNO notifications for color selectors
This is nominally a regression from commit 43bc3031483d172eccd72c3804e2d4fc2ef37de4 (unify color selectors, 2016-10-28), but that just changed the Writer color picker to behave the same way as the Impress one. The Impress one started to emit these events with daeed90f4586eb9533041fb89bee163a5193596c (re-base on ALv2 code. Includes:, 2012-11-15), to fix i#118707, improving accessibility. That means either the focus changes and then accessibility is happy or the focus does not change and then the UNO API client only gets events when the user actually switches to an other window. Fix the problem with suppressing UNO-level notifications for the problematic events, by moving the existing VclListenerLock to a public header and using it at two more places in svtools. This should address not just color selectors, but in general other toolbar menus / popup windows. Change-Id: If427708c5b9fe4fa49cb8f00ec04b32cb28eb391 Reviewed-on: https://gerrit.libreoffice.org/48570 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 250ad9311a613d9b4e1cf5cf5fdaf33d9b326220)
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/toolbarmenu.cxx2
-rw-r--r--svtools/source/uno/popupwindowcontroller.cxx3
2 files changed, 5 insertions, 0 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 12a651f49fa0..acd10a9531c0 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -35,6 +35,7 @@
#include <svtools/framestatuslistener.hxx>
#include <svtools/valueset.hxx>
#include <svtools/toolbarmenu.hxx>
+#include <toolkit/awt/vclxwindow.hxx>
#include "toolbarmenuimp.hxx"
using namespace ::com::sun::star::uno;
@@ -1486,6 +1487,7 @@ bool ToolbarPopup::IsInPopupMode()
void ToolbarPopup::EndPopupMode()
{
+ VclListenerLock aLock(this, /*bSystemWindow=*/true);
GetDockingManager()->EndPopupMode(this);
}
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx
index 51f2b6e10f42..19276a45854f 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -19,6 +19,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <toolkit/awt/vclxwindow.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/svapp.hxx>
@@ -213,6 +214,8 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow()
pWin->EnableDocking();
mxImpl->SetPopupWindow(pWin,pToolBox);
+
+ VclListenerLock aLock(pWin, /*bSystemWindow=*/true);
vcl::Window::GetDockingManager()->StartPopupMode( pToolBox, pWin, eFloatFlags );
}
}