vcl/inc/helpwin.hxx | 7 ++----- vcl/source/app/help.cxx | 5 ----- vcl/unx/gtk/fpicker/SalGtkPicker.cxx | 23 +++++++++++++++++------ 3 files changed, 19 insertions(+), 16 deletions(-)
New commits: commit f43058753b6d9850261ab050d14de7b9e4ec8a37 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 30 11:45:16 2015 +0100 gtk3: detect if a new frame is just a tooltip Change-Id: I906f53ca5428b51077b4ac28462c2e8827f2a31f diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx index 2d2ff30..6f9cfb2 100644 --- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx @@ -25,6 +25,8 @@ #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp> +#include <com/sun/star/accessibility/XAccessibleContext.hpp> +#include <com/sun/star/accessibility/AccessibleRole.hpp> #include <comphelper/processfactory.hxx> #include <rtl/process.h> #include <osl/diagnose.h> @@ -132,15 +134,24 @@ RunDialog::~RunDialog() g_source_remove_by_user_data (this); } -void SAL_CALL RunDialog::windowOpened( const ::com::sun::star::lang::EventObject& ) - throw (::com::sun::star::uno::RuntimeException, std::exception) +void SAL_CALL RunDialog::windowOpened(const css::lang::EventObject& e) + throw (css::uno::RuntimeException, std::exception) { -#if !GTK_CHECK_VERSION(3,0,0) SolarMutexGuard g; + + //Don't popdown dialogs if a tooltip appears elsewhere, that's ok, but do pop down + //if another dialog/frame is launched. + css::uno::Reference<css::accessibility::XAccessible> xAccessible(e.Source, css::uno::UNO_QUERY); + if (xAccessible.is()) + { + css::uno::Reference<css::accessibility::XAccessibleContext> xContext(xAccessible->getAccessibleContext()); + if (xContext.is() && xContext->getAccessibleRole() == css::accessibility::AccessibleRole::TOOL_TIP) + { + return; + } + } + g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(canceldialog), this, NULL); -#else - SAL_WARN( "vcl", "ignoring windowOpened, because gtk3 dialog is probably not modal as expected and a tooltip was triggered" ); -#endif } void SAL_CALL RunDialog::queryTermination( const ::com::sun::star::lang::EventObject& ) commit 6b2006c26713793867cfa2527d2d9c67e94ddb7d Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 30 10:31:15 2015 +0100 CreateAccessible just forwards to the parent impl already Change-Id: I74bce8dc7b3e97eaea3964f476b3d3e3233100df diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx index 329472f..a04eb71 100644 --- a/vcl/inc/helpwin.hxx +++ b/vcl/inc/helpwin.hxx @@ -53,8 +53,6 @@ private: virtual OUString GetText() const SAL_OVERRIDE; void ImplShow(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; - virtual void dispose() SAL_OVERRIDE; public: HelpTextWindow( vcl::Window* pParent, const OUString& rText, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle ); diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 6483a97..c41ff9f 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -468,11 +468,6 @@ OUString HelpTextWindow::GetText() const return maHelpText; } -::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > HelpTextWindow::CreateAccessible() -{ - return FloatingWindow::CreateAccessible(); -} - void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle, const OUString& rHelpText, const OUString& rStatusText, const Point& rScreenPos, const Rectangle* pHelpArea ) commit 9eb8839cc41824c4cedb1360a80ed88fa269c0d6 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 30 10:30:46 2015 +0100 these can be private Change-Id: I5f0501dbe14cbb4e4fda3ec30fb7e1e893faf108 diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx index 5889a4f..329472f 100644 --- a/vcl/inc/helpwin.hxx +++ b/vcl/inc/helpwin.hxx @@ -43,7 +43,7 @@ private: sal_uInt16 mnHelpWinStyle; QuickHelpFlags mnStyle; -protected: +private: DECL_LINK_TYPED( TimerHdl, Timer*, void ); virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE; @@ -53,11 +53,12 @@ protected: virtual OUString GetText() const SAL_OVERRIDE; void ImplShow(); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; + virtual void dispose() SAL_OVERRIDE; public: HelpTextWindow( vcl::Window* pParent, const OUString& rText, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle ); virtual ~HelpTextWindow(); - virtual void dispose() SAL_OVERRIDE; const OUString& GetHelpText() const { return maHelpText; } void SetHelpText( const OUString& rHelpText ); @@ -72,8 +73,6 @@ public: Size CalcOutSize() const; const Rectangle& GetHelpArea() const { return maHelpArea; } - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; }; void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle,
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits