mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ModifierKeys: Avoid direct access to currentModifiers when reading but not writing
This commit is contained in:
parent
0a71227126
commit
5d7208bb54
11 changed files with 64 additions and 64 deletions
|
|
@ -189,7 +189,7 @@ Component* ComponentPeer::getTargetForKeyPress()
|
|||
bool ComponentPeer::handleKeyPress (const int keyCode, const juce_wchar textCharacter)
|
||||
{
|
||||
return handleKeyPress (KeyPress (keyCode,
|
||||
ModifierKeys::currentModifiers.withoutMouseButtons(),
|
||||
ModifierKeys::getCurrentModifiers().withoutMouseButtons(),
|
||||
textCharacter));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ void TooltipWindow::displayTipInternal (Point<int> screenPos, const String& tip,
|
|||
String TooltipWindow::getTipFor (Component& c)
|
||||
{
|
||||
if (detail::WindowingHelpers::isForegroundOrEmbeddedProcess (&c)
|
||||
&& ! ModifierKeys::currentModifiers.isAnyMouseButtonDown())
|
||||
&& ! ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown())
|
||||
{
|
||||
if (auto* ttc = dynamic_cast<TooltipClient*> (&c))
|
||||
if (! c.isCurrentlyBlockedByAnotherModalComponent())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue