Mercurial > code > home > repos > light9
annotate tkdnd-patch-on-r95 @ 1439:951ef08ce4ad
don't save zeros in effects. put each fx in its own n3 file
Ignore-this: a2b27986c2aacd3f48fd9110b6d673a0
author | drewp@bigasterisk.com |
---|---|
date | Sat, 11 Jun 2016 21:13:01 +0000 |
parents | 43ddee394d28 |
children |
rev | line source |
---|---|
866
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
1 Index: unix/TkDND_XDND.c |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
2 =================================================================== |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
3 --- unix/TkDND_XDND.c (revision 95) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
4 +++ unix/TkDND_XDND.c (working copy) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
5 @@ -517,7 +517,7 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
6 ActionCopy, ActionMove, ActionLink, ActionAsk, ActionPrivate, |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
7 refuse_drop, ActionDefault |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
8 }; |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
9 - |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
10 + printf("TkDND_HandleXdndDrop\n"); |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
11 if (interp == NULL) return False; |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
12 if (XDND_DROP_TIME(xevent) != 0) { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
13 time = ((sizeof(Time) == 8 && XDND_DROP_TIME(xevent) < 0) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
14 Index: CMakeLists.txt |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
15 =================================================================== |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
16 --- CMakeLists.txt (revision 95) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
17 +++ CMakeLists.txt (working copy) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
18 @@ -168,7 +168,7 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
19 ADD_DEFINITIONS ( -DTKDND_VERSION="${PKG_VERSION}" ) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
20 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
21 ## Package debug definitions... |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
22 -# ADD_DEFINITIONS ( -DDEBUG_CLIENTMESSAGE_HANDLER ) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
23 +ADD_DEFINITIONS ( -DDEBUG_CLIENTMESSAGE_HANDLER ) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
24 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
25 ## =========================================================================== |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
26 ## Declare the package shared library target... |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
27 Index: library/tkdnd_unix.tcl |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
28 =================================================================== |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
29 --- library/tkdnd_unix.tcl (revision 95) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
30 +++ library/tkdnd_unix.tcl (working copy) |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
31 @@ -54,7 +54,7 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
32 variable _last_mouse_root_y 0 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
33 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
34 proc debug {msg} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
35 - puts $msg |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
36 + #puts $msg |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
37 };# debug |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
38 };# namespace xdnd |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
39 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
40 @@ -69,6 +69,7 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
41 variable _common_drop_target_types; set _common_drop_target_types {} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
42 variable _actionlist |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
43 variable _drag_source; set _drag_source $drag_source |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
44 +debug "_drop_target clear1" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
45 variable _drop_target; set _drop_target {} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
46 variable _actionlist; set _actionlist \ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
47 {copy move link ask private} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
48 @@ -82,6 +83,15 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
49 return default |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
50 };# xdnd::_HandleXdndEnter |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
51 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
52 + |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
53 +proc xdnd::_pointWithinWindow {win rootX rootY} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
54 + set x [winfo rootx $win] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
55 + set y [winfo rooty $win] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
56 + set w [winfo width $win] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
57 + set h [winfo height $win] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
58 + return [expr "$rootX >= $x && $rootX < $x+$w && $rootY >= $y && $rootY < $y+$h"] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
59 +} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
60 + |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
61 # ---------------------------------------------------------------------------- |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
62 # Command xdnd::_HandleXdndPosition |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
63 # ---------------------------------------------------------------------------- |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
64 @@ -102,9 +112,19 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
65 # debug "xdnd::_HandleXdndPosition: drop_target=$drop_target,\ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
66 # _drop_target=$_drop_target, rootX=$rootX, rootY=$rootY" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
67 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
68 + # drop_target may be a parent of the real target. |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
69 + |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
70 + # this is all a workaround for 'winfo containing' never returning anything |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
71 + set children [winfo children $drop_target] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
72 + foreach child $children { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
73 + if {[_pointWithinWindow $child $rootX $rootY]} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
74 + return [_HandleXdndPosition $child $rootX $rootY $drag_source] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
75 + } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
76 + } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
77 + |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
78 if {![info exists _drag_source] && ![string length $_drag_source]} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
79 - # debug "xdnd::_HandleXdndPosition: no or empty _drag_source:\ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
80 - # return refuse_drop" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
81 + debug "xdnd::_HandleXdndPosition: no or empty _drag_source:\ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
82 + return refuse_drop" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
83 return refuse_drop |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
84 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
85 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
86 @@ -116,7 +136,7 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
87 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
88 ## Does the new drop target support any of our new types? |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
89 set _types [bind $drop_target <<DropTargetTypes>>] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
90 - # debug ">> Accepted types: $drop_target $_types" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
91 + debug ">> Accepted types: $drop_target $_types" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
92 if {[llength $_types]} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
93 ## Examine the drop target types, to find at least one match with the drag |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
94 ## source types... |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
95 @@ -130,7 +150,7 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
96 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
97 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
98 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
99 - # debug "\t($_drop_target) -> ($drop_target)" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
100 + debug "\t($_drop_target) -> ($drop_target)" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
101 if {$drop_target != $_drop_target} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
102 if {[string length $_drop_target]} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
103 ## Call the <<DropLeave>> event. |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
104 @@ -152,6 +172,7 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
105 uplevel \#0 $cmd |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
106 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
107 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
108 + debug "_drop_target clear2" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
109 set _drop_target {} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
110 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
111 if {[info exists common_drag_source_types]} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
112 @@ -179,15 +200,16 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
113 set _action [uplevel \#0 $cmd] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
114 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
115 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
116 + debug "_drop_target set3 $drop_target" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
117 set _drop_target $drop_target |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
118 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
119 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
120 set _action refuse_drop |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
121 - set _drop_target {} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
122 if {[info exists common_drag_source_types]} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
123 set _action copy |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
124 set _common_drag_source_types $common_drag_source_types |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
125 set _common_drop_target_types $common_drop_target_types |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
126 + debug "_drop_target set5 -> $_drop_target" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
127 set _drop_target $drop_target |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
128 ## Drop target supports at least one type. Send a <<DropPosition>>. |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
129 set cmd [bind $drop_target <<DropPosition>>] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
130 @@ -206,6 +228,10 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
131 ] $cmd] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
132 set _action [uplevel \#0 $cmd] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
133 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
134 + } else { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
135 + # logic wasn't clear; i'm just guessing this should be the else-clause |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
136 + debug "_drop_target clear4, was $_drop_target" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
137 + set _drop_target {} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
138 } |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
139 # Return values: copy, move, link, ask, private, refuse_drop, default |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
140 # debug "xdnd::_HandleXdndPosition: ACTION: $_action" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
141 @@ -227,7 +253,10 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
142 variable _drop_target |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
143 variable _last_mouse_root_x |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
144 variable _last_mouse_root_y |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
145 - if {![info exists _drop_target]} {set _drop_target {}} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
146 + if {![info exists _drop_target]} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
147 +debug "_drop_target clear6" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
148 +set _drop_target {} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
149 +} |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
150 # debug "xdnd::_HandleXdndLeave: _drop_target=$_drop_target" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
151 if {[info exists _drop_target] && [string length $_drop_target]} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
152 set cmd [bind $_drop_target <<DropLeave>>] |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
153 @@ -273,7 +302,7 @@ |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
154 set rootX $_last_mouse_root_x |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
155 set rootY $_last_mouse_root_y |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
156 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
157 - # puts "xdnd::_HandleXdndDrop: $time" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
158 + puts "xdnd::_HandleXdndDrop: $time $_drop_target" |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
159 |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
160 if {![info exists _drag_source] && ![string length $_drag_source]} { |
43ddee394d28
more tkdnd install instructions
Drew Perttula <drewp@bigasterisk.com>
parents:
diff
changeset
|
161 return refuse_drop |