Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions MMTabBarView/MMTabBarView/MMAttachedTabBarButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

NS_ASSUME_NONNULL_BEGIN

#define MIDDLE_MOUSE_BUTTON_NUMBER 2

@interface MMAttachedTabBarButton ()
@end

Expand Down Expand Up @@ -170,6 +172,19 @@ - (void)mouseUp:(NSEvent *)theEvent {
}
}

- (void)otherMouseUp:(NSEvent *)theEvent {

if (theEvent.buttonNumber != MIDDLE_MOUSE_BUTTON_NUMBER) {
[super otherMouseUp:theEvent];
return;
}

if (!self.suppressCloseButton) {
NSButton *closeButton = self.closeButton;
[closeButton sendAction:closeButton.action to:closeButton.target];
}
}

#pragma mark -
#pragma mark Drag Support

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ We currently try to limit widening of divergences with [Michael Monscheuer's ver
- we add a delegate method `-tabView:selectOnClosingTabViewItem:` for choice of next tab to be selected on closing a tab
- we add a method `-closeTabViewItem:` for closing a tab view item, with due execution of all delegate methods
- we add support of Swift Packet Manager (Cocoapod and Carthage remain supported)
- tabs can be closed by clicking the middle button on the mouse

Note that to limit risks of confusion with the original version, we use a `v/x.x.x` scheme for version numbering.
Ex: our `v/1.4.7` can be compared to Mimo's `v1.4.1`
Expand Down