Skip to content

Commit 7805156

Browse files
Nick Ing-Simmonseserte
authored andcommitted
import Tk 804.026 from CPAN
git-cpan-module: Tk git-cpan-version: 804.026 git-cpan-authorid: NI-S git-cpan-file: authors/id/N/NI/NI-S/Tk-804.026.tar.gz
1 parent eff0f1b commit 7805156

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+514
-370
lines changed

Change.log

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,121 @@
1+
Change 3214 on 2004/03/18 by nick@llama
2+
3+
Bump version to Tk804.026
4+
5+
Change 3213 on 2004/03/18 by nick@dromedary
6+
7+
Heisenbug hunting in entry.t
8+
9+
Change 3212 on 2004/03/18 by nick@camel
10+
11+
WinNT getOpenFile/getSaveFile uses non-dstring encode call
12+
which did not have code to append a wide NUL to end
13+
of string.
14+
15+
Change 3210 on 2004/03/18 by nick@llama
16+
17+
Loose patchlevel.h as it causes warnings with Tk-TableMatrix
18+
19+
Change 3208 on 2004/03/18 by nick@llama
20+
21+
Spinbox validate fix
22+
from (Roderich Schupp) forwared from newsgroub by Steve
23+
24+
Change 3207 on 2004/03/18 by nick@llama
25+
26+
Spinbox bbox should return list
27+
28+
Change 3206 on 2004/03/17 by nick@llama
29+
30+
Mark cause of POE callback issue, pending confirmation.
31+
32+
Change 3205 on 2004/03/17 by nick@llama
33+
34+
Re-factor DragDrop:: Rect and SunDrop so latter works again
35+
while keeping the fix to local and XDND protocols.
36+
Remove KDEDrop and KDESite (a weak ad hoc protocol used by KDE 2).
37+
38+
Change 3204 on 2004/03/17 by nick@llama
39+
40+
Copyright dates
41+
42+
Change 3203 on 2004/03/17 by nick@llama
43+
44+
When calling C code with perl args on stack as "objv"
45+
swap perl stack so if C calls back into perl it gets
46+
a private stack to mess with.
47+
(t/leak.t needs minor tuning as a result of above.)
48+
49+
Change 3202 on 2004/03/17 by nick@llama
50+
51+
Slaven's best-guess patch to get <6> and <7> working
52+
for multi-wheel mice.
53+
54+
Change 3201 on 2004/03/17 by nick@llama
55+
56+
"Michael Krause" <[email protected]> reports that
57+
EnterFocus sometimes doesn't have widget defined
58+
and suggests this workround.
59+
60+
Change 3200 on 2004/03/17 by nick@llama
61+
62+
Give TextUndo a PerlIO_layers hook
63+
Use it to make ptked do encodings.
64+
65+
Change 3199 on 2004/03/17 by nick@llama
66+
67+
Set SystemEncoding from locale via nl_langinfo if available.
68+
Make Tk::SystemEncoding return corresponding Encode object.
69+
70+
Change 3198 on 2004/03/17 by nick@llama
71+
72+
Cannot use "->containing" for DND's Over has it doesn't return
73+
our window if cursor is in toplevel belonging to another app
74+
(e.g. a drag token). So do our own search using PointToWindow.
75+
76+
Change 3197 on 2004/03/16 by nick@llama
77+
78+
Revised fix for RT ticket #5678 - Drag&Drop bug.
79+
Site is only valid if its widget is viewable and
80+
it "contains" the drop point.
81+
82+
Change 3196 on 2004/03/16 by nick@llama
83+
84+
Revert change 3195 to DragDrop/Rect.pm
85+
It isn't right and breaks Konqueror Xdnd drops on pTk sites.
86+
87+
Change 3195 on 2004/03/16 by nick@llama
88+
89+
Slaven's patch for Drag&Drop from
90+
https://rt.cpan.org/Ticket/Display.html?id=5678
91+
92+
Change 3179 on 2004/03/10 by nick@llama
93+
94+
Fallout of post-destroy call to After object means
95+
that Tk::After::Cancelled needs a method.
96+
97+
Change 3178 on 2004/03/10 by nick@llama
98+
99+
POD markup glitches
100+
101+
Change 3177 on 2004/03/09 by nick@llama
102+
103+
HPUX build fix from [email protected]
104+
105+
Change 3176 on 2004/03/08 by nick@nickwork
106+
107+
Detect and warn RedHat UTF-8 (But RedHat9.0 seems to build ok now.)
108+
Update README
109+
110+
Change 3175 on 2004/03/08 by nick@nickwork
111+
112+
Fix die-after-exit for t/browseentry.t (at least as occurs with
113+
threaded official perl5.8.0 on RedHat 9).
114+
115+
Change 3174 on 2004/03/07 by nick@llama
116+
117+
Tk-804.025_beta16 Release Preparation
118+
1119
Change 3173 on 2004/03/07 by nick@llama
2120

3121
Work round LVs (e.g. substr) not upgrading to UTF-8

Compound/Compound.xs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
2+
Copyright (c) 1995-2004 Nick Ing-Simmons. All rights reserved.
33
This program is free software; you can redistribute it and/or
44
modify it under the same terms as Perl itself.
55
*/

DragDrop/DragDrop/KDEDrop.pm

Lines changed: 0 additions & 85 deletions
This file was deleted.

DragDrop/DragDrop/KDESite.pm

Lines changed: 0 additions & 50 deletions
This file was deleted.

DragDrop/DragDrop/Rect.pm

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,60 @@
11
package Tk::DragDrop::Rect;
2+
use strict;
23
use Carp;
34

45
# Proxy class which represents sites to the dropping side
56

67
use vars qw($VERSION);
7-
$VERSION = sprintf '4.%03d', q$Revision: #6 $ =~ /\D(\d+)\s*$/;
8+
$VERSION = sprintf '4.%03d', q$Revision: #11 $ =~ /\D(\d+)\s*$/;
9+
10+
# Some default methods when called site side
11+
# XIDs and viewable-ness from widget
12+
13+
# XID of ancestor
14+
sub ancestor { ${shift->widget->toplevel->WindowId} }
15+
16+
# XID of site window
17+
sub win { ${shift->widget->WindowId} }
18+
19+
# Is site window mapped
20+
sub viewable { shift->widget->viewable }
821

922
sub Over
1023
{
1124
my ($site,$X,$Y) = @_;
25+
1226
my $x = $site->X;
1327
my $y = $site->Y;
1428
my $w = $site->width;
1529
my $h = $site->height;
16-
1730
my $val = ($X >= $x && $X < ($x + $w) && $Y >= $y && $Y < ($y + $h));
18-
# print "Over ",$site->Show," $X,$Y => $val\n";
19-
return $val;
31+
32+
return 0 unless $val;
33+
34+
my $widget = $site->widget;
35+
36+
# Now XTranslateCoords from root window to site window's
37+
# ancestor. Ancestors final descendant should be the site window.
38+
# Like $win->containing but avoids a problem that dropper's "token"
39+
# window may be the toplevel (child of root) that contains X,Y
40+
# so if that is in another application ->containing does not
41+
# give us a window.
42+
my $id = $site->ancestor;
43+
while (1)
44+
{
45+
my $cid = $widget->PointToWindow($X,$Y,$id);
46+
last unless $cid;
47+
$id = $cid;
48+
}
49+
return ($id == $site->win);
2050
}
2151

2252
sub FindSite
2353
{
2454
my ($class,$widget,$X,$Y) = @_;
2555
foreach my $site ($class->SiteList($widget))
2656
{
27-
return $site if ($site->Over($X,$Y));
57+
return $site if ($site->viewable && $site->Over($X,$Y));
2858
}
2959
return undef;
3060
}

0 commit comments

Comments
 (0)