Browse Source

Windows Accessibility: Only send window open/close events for main application windows to fix COM ref-counting leak

v6.1.6
ed 4 years ago
parent
commit
82bcad9d30
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      modules/juce_gui_basics/native/accessibility/juce_win32_Accessibility.cpp

+ 8
- 0
modules/juce_gui_basics/native/accessibility/juce_win32_Accessibility.cpp View File

@@ -164,6 +164,14 @@ void notifyAccessibilityEventInternal (const AccessibilityHandler& handler, Inte
return;
}
if (eventType == InternalAccessibilityEvent::windowOpened
|| eventType == InternalAccessibilityEvent::windowClosed)
{
if (auto* peer = handler.getComponent().getPeer())
if ((peer->getStyleFlags() & ComponentPeer::windowHasTitleBar) == 0)
return;
}
auto event = [eventType]() -> EVENTID
{
switch (eventType)


Loading…
Cancel
Save