Bug 516249 - [10.6] Wrong event modifiers passed to plugin on switching Spaces with Ctrl-<number key>. r=josh

This commit is contained in:
Steven Michaud 2009-09-25 15:10:04 -05:00
parent e604b278dd
commit 774cecaad6
2 changed files with 8 additions and 8 deletions

View File

@ -3360,7 +3360,7 @@ static void InitializeEventRecord(EventRecord* event, Point* aMousePosition)
::GetGlobalMouse(&event->where);
}
event->when = ::TickCount();
event->modifiers = ::GetCurrentEventKeyModifiers();
event->modifiers = ::GetCurrentKeyModifiers();
}
#endif

View File

@ -2218,7 +2218,7 @@ NS_IMETHODIMP nsChildView::GetToggledKeyState(PRUint32 aKeyCode,
default:
return NS_ERROR_NOT_IMPLEMENTED;
}
PRUint32 modifierFlags = ::GetCurrentEventKeyModifiers();
PRUint32 modifierFlags = ::GetCurrentKeyModifiers();
*aLEDState = (modifierFlags & key) != 0;
return NS_OK;
@ -3151,7 +3151,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
carbonEvent.message = 0;
carbonEvent.when = ::TickCount();
::GetGlobalMouse(&carbonEvent.where);
carbonEvent.modifiers = ::GetCurrentEventKeyModifiers();
carbonEvent.modifiers = ::GetCurrentKeyModifiers();
geckoEvent.nativeMsg = &carbonEvent;
}
#endif
@ -3203,7 +3203,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
carbonEvent.message = 0;
carbonEvent.when = ::TickCount();
::GetGlobalMouse(&carbonEvent.where);
carbonEvent.modifiers = ::GetCurrentEventKeyModifiers();
carbonEvent.modifiers = ::GetCurrentKeyModifiers();
geckoEvent.nativeMsg = &carbonEvent;
}
#endif
@ -3253,7 +3253,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
carbonEvent.message = 0;
carbonEvent.when = ::TickCount();
::GetGlobalMouse(&carbonEvent.where);
carbonEvent.modifiers = ::GetCurrentEventKeyModifiers();
carbonEvent.modifiers = ::GetCurrentKeyModifiers();
event.nativeMsg = &carbonEvent;
}
#endif
@ -3302,7 +3302,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
carbonEvent.message = 0;
carbonEvent.when = ::TickCount();
::GetGlobalMouse(&carbonEvent.where);
carbonEvent.modifiers = ::GetCurrentEventKeyModifiers();
carbonEvent.modifiers = ::GetCurrentKeyModifiers();
geckoEvent.nativeMsg = &carbonEvent;
}
#endif
@ -3348,7 +3348,7 @@ static const PRInt32 sShadowInvalidationInterval = 100;
carbonEvent.message = 0;
carbonEvent.when = ::TickCount();
::GetGlobalMouse(&carbonEvent.where);
carbonEvent.modifiers = btnState | ::GetCurrentEventKeyModifiers();
carbonEvent.modifiers = btnState | ::GetCurrentKeyModifiers();
geckoEvent.nativeMsg = &carbonEvent;
}
#endif
@ -3844,7 +3844,7 @@ static void ConvertCocoaKeyEventToCarbonEvent(NSEvent* cocoaEvent, EventRecord&
pluginEvent.message = (charCode & 0x00FF) | (nsCocoaUtils::GetCocoaEventKeyCode(cocoaEvent) << 8);
pluginEvent.when = ::TickCount();
::GetGlobalMouse(&pluginEvent.where);
pluginEvent.modifiers = ::GetCurrentEventKeyModifiers();
pluginEvent.modifiers = ::GetCurrentKeyModifiers();
NS_OBJC_END_TRY_ABORT_BLOCK;
}