Browse Source

Windows: Only load UIA functions when accessibility is active

v6.1.6
ed 4 years ago
parent
commit
70d0657f00
2 changed files with 3 additions and 11 deletions
  1. +3
    -7
      modules/juce_gui_basics/native/accessibility/juce_win32_Accessibility.cpp
  2. +0
    -4
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp

+ 3
- 7
modules/juce_gui_basics/native/accessibility/juce_win32_Accessibility.cpp View File

@@ -60,6 +60,7 @@ public:
~AccessibilityNativeImpl()
{
accessibilityElement->invalidateElement();
--providerCount;
if (auto* wrapper = WindowsUIAWrapper::getInstanceWithoutCreating())
{
@@ -68,7 +69,7 @@ public:
wrapper->disconnectProvider (provider);
if (--providerCount == 0)
if (providerCount == 0)
wrapper->disconnectAllProviders();
}
}
@@ -228,11 +229,6 @@ void AccessibilityHandler::DestroyNativeImpl::operator() (AccessibilityHandler::
//==============================================================================
namespace WindowsAccessibility
{
void initialiseUIAWrapper()
{
WindowsUIAWrapper::getInstance();
}
long getUiaRootObjectId()
{
return static_cast<long> (UiaRootObjectId);
@@ -243,7 +239,7 @@ namespace WindowsAccessibility
if (isStartingUpOrShuttingDown() || (handler == nullptr || ! isHandlerValid (*handler)))
return false;
if (auto* wrapper = WindowsUIAWrapper::getInstanceWithoutCreating())
if (auto* wrapper = WindowsUIAWrapper::getInstance())
{
ComSmartPtr<IRawElementProviderSimple> provider;
handler->getNativeImplementation()->QueryInterface (IID_PPV_ARGS (provider.resetAndGetPointerAddress()));


+ 0
- 4
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -65,7 +65,6 @@ void* getUser32Function (const char*);
namespace WindowsAccessibility
{
void initialiseUIAWrapper();
long getUiaRootObjectId();
bool handleWmGetObject (AccessibilityHandler*, WPARAM, LPARAM, LRESULT*);
void revokeUIAMapEntriesForWindow (HWND);
@@ -1380,9 +1379,6 @@ public:
parentToAddTo (parent),
currentRenderingEngine (softwareRenderingEngine)
{
// make sure that the UIA wrapper singleton is loaded
WindowsAccessibility::initialiseUIAWrapper();
callFunctionIfNotLocked (&createWindowCallback, this);
setTitle (component.getName());


Loading…
Cancel
Save