SL-11432 FIXED [OSX] Avatar is spinning when pressing Alt+D+Command and then releasing D key

meow-7.2.2
Mnikolenko ProductEngine 2019-06-20 15:41:27 +03:00
parent 16437e771b
commit b813814202
4 changed files with 17 additions and 10 deletions

View File

@ -46,3 +46,6 @@
- (void) languageUpdated;
- (bool) romanScript;
@end
@interface LLApplication : NSApplication
@end

View File

@ -509,15 +509,6 @@ attributedStringInfo getSegments(NSAttributedString *str)
{
[[self inputContext] handleEvent:theEvent];
}
// OS X intentionally does not send us key-up information on cmd-key combinations.
// This behaviour is not a bug, and only applies to cmd-combinations (no others).
// Since SL assumes we receive those, we fake it here.
if (mModifiers & NSCommandKeyMask && !mHasMarkedText)
{
eventData.mKeyEvent = NativeKeyEventData::KEYUP;
callKeyUp(&eventData, [theEvent keyCode], mModifiers);
}
}
- (void)flagsChanged:(NSEvent *)theEvent

View File

@ -2117,7 +2117,7 @@ if (DARWIN)
set(MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}")
set(MACOSX_BUNDLE_COPYRIGHT "Copyright © Linden Research, Inc. 2018")
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "SecondLife.nib")
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "LLApplication")
# https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
set(CMAKE_MACOSX_RPATH 1)

View File

@ -342,3 +342,16 @@ struct AttachmentInfo
#endif // LL_BUGSPLAT
@end
@implementation LLApplication
- (void)sendEvent:(NSEvent *)event
{
[super sendEvent:event];
if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask))
{
[[self keyWindow] sendEvent:event];
}
}
@end