Mac: Fix compile error in cefclient_osr_widget_mac.mm when using the 10.6 SDK.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1335 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
4abdd35309
commit
6a7353be3e
|
@ -468,7 +468,10 @@ void ClientOSRHandler::SetLoading(bool isLoading) {
|
|||
[self keyDown:event];
|
||||
}
|
||||
|
||||
- (void) shortCircuitScrollWheelEvent:(NSEvent*)event {
|
||||
- (void)shortCircuitScrollWheelEvent:(NSEvent*)event {
|
||||
#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
|
||||
__MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
// Phase is only supported in OS-X 10.7 and newer.
|
||||
if ([event phase] != NSEventPhaseEnded &&
|
||||
[event phase] != NSEventPhaseCancelled)
|
||||
return;
|
||||
|
@ -479,9 +482,13 @@ void ClientOSRHandler::SetLoading(bool isLoading) {
|
|||
[NSEvent removeMonitor:endWheelMonitor_];
|
||||
endWheelMonitor_ = nil;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)scrollWheel:(NSEvent *)event {
|
||||
#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
|
||||
__MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
// Phase is only supported in OS-X 10.7 and newer.
|
||||
// Use an NSEvent monitor to listen for the wheel-end end. This ensures that
|
||||
// the event is received even when the mouse cursor is no longer over the
|
||||
// view when the scrolling ends. Also it avoids sending duplicate scroll
|
||||
|
@ -497,6 +504,7 @@ void ClientOSRHandler::SetLoading(bool isLoading) {
|
|||
}
|
||||
|
||||
[self sendScrollWheelEvet:event];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)sendScrollWheelEvet:(NSEvent *)event {
|
||||
|
|
Loading…
Reference in New Issue