From 744ae6f2de32c08f2f330b5baeeda51d5ff0259f Mon Sep 17 00:00:00 2001 From: vincentdarley Date: Thu, 6 Apr 2006 22:15:14 +0000 Subject: add support for proxy icon dragging and titlepath menu --- ChangeLog | 6 ++++++ macosx/tkMacOSXMouseEvent.c | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 27cec60..2c8d2be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-06 Vince Darley + + * macosx/tkMacOSXMouseEvent.c: now that [wm attributes -titlepath] + works correctly, add OS support for dragging proxy icons and + using the titlepath menu. + 2006-04-06 Daniel Steffen * macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): fix errors diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index 366903c..b547ea9 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -54,7 +54,7 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.17 2006/03/24 14:58:01 das Exp $ + * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.18 2006/04/06 22:15:14 vincentdarley Exp $ */ #include "tkMacOSXInt.h" @@ -165,6 +165,24 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr) if (medPtr->whichWin != NULL && medPtr->window == None) { return 0; } + if (eventPtr->eKind == kEventMouseDown) { + if (IsWindowPathSelectEvent(medPtr->whichWin, eventPtr->eventRef)) { + SInt32 result; + return WindowPathSelect(medPtr->whichWin, NULL, &result); + } + if (medPtr->windowPart == inProxyIcon) { + OSStatus status = TrackWindowProxyDrag(medPtr->whichWin, where); + + if (status == errUserWantsToDragWindow) { + medPtr->windowPart = inDrag; + } else { + if (status == noErr) { + printf("drag successful"); + } + return status; + } + } + } medPtr->state = ButtonModifiers2State(GetCurrentEventButtonState(), GetCurrentEventKeyModifiers()); medPtr->global = where; -- cgit v0.12