Switch to a single OS X swipe event with a direction argument
This commit is contained in:
parent
03319a5426
commit
8482109dea
7 changed files with 21 additions and 64 deletions
|
@ -268,15 +268,15 @@ bool ScopedDisableResize::disable_resize_ = false;
|
|||
// NSWindow overrides.
|
||||
|
||||
- (void)swipeWithEvent:(NSEvent *)event {
|
||||
if (event.deltaY == 1.0) {
|
||||
shell_->NotifyWindowSwipeUp();
|
||||
} else if (event.deltaX == -1.0) {
|
||||
shell_->NotifyWindowSwipeRight();
|
||||
} else if (event.deltaY == -1.0) {
|
||||
shell_->NotifyWindowSwipeDown();
|
||||
} else if (event.deltaX == 1.0) {
|
||||
shell_->NotifyWindowSwipeLeft();
|
||||
}
|
||||
if (event.deltaY == 1.0) {
|
||||
shell_->NotifyWindowSwipe("up");
|
||||
} else if (event.deltaX == -1.0) {
|
||||
shell_->NotifyWindowSwipe("right");
|
||||
} else if (event.deltaY == -1.0) {
|
||||
shell_->NotifyWindowSwipe("down");
|
||||
} else if (event.deltaX == 1.0) {
|
||||
shell_->NotifyWindowSwipe("left");
|
||||
}
|
||||
}
|
||||
|
||||
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue