diff options
-rw-r--r-- | macosx/tkMacOSXMouseEvent.c | 9 | ||||
-rw-r--r-- | macosx/tkMacOSXPrivate.h | 7 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 1 |
3 files changed, 14 insertions, 3 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index f2d7e32..be08a29 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -69,8 +69,13 @@ enum { case NSRightMouseDragged: case NSOtherMouseDragged: button = [theEvent buttonNumber] + Button1; + break; case NSMouseEntered: + [(TKWindow *)eventWindow setMouseInResizeArea:YES]; + break; case NSMouseExited: + [(TKWindow *)eventWindow setMouseInResizeArea:NO]; + break; case NSCursorUpdate: case NSLeftMouseUp: case NSRightMouseUp: @@ -100,12 +105,10 @@ enum { */ if (eventType == NSLeftMouseDown && + [(TKWindow *)eventWindow mouseInResizeArea] && ([eventWindow styleMask] & NSResizableWindowMask) && [NSApp macOSVersion] > 100600) { - NSRect frame = [eventWindow frame]; - if (local.x < 3 || local.x > frame.size.width - 3 || local.y < 3) { return theEvent; - } } global = [eventWindow tkConvertPointToScreen: local]; tkwin = TkMacOSXGetCapture(); diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index 5ac834c..ef753e5 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -436,6 +436,13 @@ VISIBILITY_HIDDEN VISIBILITY_HIDDEN @interface TKWindow : NSWindow +{ +#ifdef __i386__ + /* The Objective C runtime used on i386 requires this. */ + Bool _mouseInResizeArea; +#endif +} +@property Bool mouseInResizeArea; @end @interface TKWindow(TKWm) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 453f277..12ce7b2 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -363,6 +363,7 @@ static void RemoveTransient(TkWindow *winPtr); #pragma mark TKWindow(TKWm) @implementation TKWindow: NSWindow +@synthesize mouseInResizeArea = _mouseInResizeArea; @end @implementation TKWindow(TKWm) |