summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2006-04-06 22:15:14 (GMT)
committervincentdarley <vincentdarley>2006-04-06 22:15:14 (GMT)
commit744ae6f2de32c08f2f330b5baeeda51d5ff0259f (patch)
tree0a0b8a623a9b3e88ed06f43bdbd0dfbe0d82a0a5
parent51e742898c9dbae025546b73a412d1f992329241 (diff)
downloadtk-744ae6f2de32c08f2f330b5baeeda51d5ff0259f.zip
tk-744ae6f2de32c08f2f330b5baeeda51d5ff0259f.tar.gz
tk-744ae6f2de32c08f2f330b5baeeda51d5ff0259f.tar.bz2
add support for proxy icon dragging and titlepath menu
-rw-r--r--ChangeLog6
-rw-r--r--macosx/tkMacOSXMouseEvent.c20
2 files changed, 25 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 27cec60..2c8d2be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-06 Vince Darley <vincentdarley@users.sourceforge.net>
+
+ * 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 <das@users.sourceforge.net>
* 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;