mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Accessibility: Disable accessibility for TooltipWindows to prevent them from interfering with focus
This commit is contained in:
parent
f6ceba3e5b
commit
422c8f8114
2 changed files with 1 additions and 18 deletions
|
|
@ -32,6 +32,7 @@ TooltipWindow::TooltipWindow (Component* parentComp, int delayMs)
|
|||
{
|
||||
setAlwaysOnTop (true);
|
||||
setOpaque (true);
|
||||
setAccessible (false);
|
||||
|
||||
if (parentComp != nullptr)
|
||||
parentComp->addChildComponent (this);
|
||||
|
|
@ -119,12 +120,6 @@ void TooltipWindow::displayTip (Point<int> screenPos, const String& tip)
|
|||
#endif
|
||||
|
||||
toFront (false);
|
||||
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
{
|
||||
setDescription (tip);
|
||||
handler->grabFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,9 +140,6 @@ void TooltipWindow::hideTip()
|
|||
{
|
||||
if (! reentrant)
|
||||
{
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
handler->giveAwayFocus();
|
||||
|
||||
tipShowing.clear();
|
||||
removeFromDesktop();
|
||||
setVisible (false);
|
||||
|
|
@ -225,10 +217,4 @@ void TooltipWindow::timerCallback()
|
|||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
std::unique_ptr<AccessibilityHandler> TooltipWindow::createAccessibilityHandler()
|
||||
{
|
||||
return std::make_unique<AccessibilityHandler> (*this, AccessibilityRole::tooltip);
|
||||
}
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
|
|
@ -129,9 +129,6 @@ public:
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
/** @internal */
|
||||
std::unique_ptr<AccessibilityHandler> createAccessibilityHandler() override;
|
||||
|
||||
/** @internal */
|
||||
float getDesktopScaleFactor() const override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue