mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 01:18:02 +00:00
Fixed mouse down within the resize slop outside a window not resizing
This commit is contained in:
1 parent
17f07ee888
commit
e292bf01d7
1 file changed
+14
-1
@@ -1764,7 +1764,19 @@ CPTexturedBackgroundWindowMask
|
||||
case CPRightMouseDown:
|
||||
_leftMouseDownView = [_windowView hitTest:point];
|
||||
|
||||
if (_leftMouseDownView != _firstResponder && [_leftMouseDownView acceptsFirstResponder])
|
||||
/*
|
||||
hitTest: will only test within the window's frame.
|
||||
If that fails, check if a left mousedown is within
|
||||
the resize slop outside the frame.
|
||||
*/
|
||||
if (!_leftMouseDownView &&
|
||||
type === CPLeftMouseDown &&
|
||||
[self _isValidMousePoint:[self convertBaseToGlobal:point]])
|
||||
{
|
||||
_leftMouseDownView = _windowView;
|
||||
}
|
||||
|
||||
if (_leftMouseDownView !== _firstResponder && [_leftMouseDownView acceptsFirstResponder])
|
||||
[self makeFirstResponder:_leftMouseDownView];
|
||||
|
||||
[CPApp activateIgnoringOtherApps:YES];
|
||||
@@ -3334,6 +3346,7 @@ var keyViewComparator = function(lhs, rhs, context)
|
||||
return _CGRectContainsPoint(_frame, aPoint);
|
||||
}
|
||||
|
||||
/* aPoint should be global */
|
||||
- (BOOL)_isValidMousePoint:(CGPoint)aPoint
|
||||
{
|
||||
// If we are using the new resizing mode, mouse events are valid
|
||||
|
||||
Reference in new issue
Block a user