aboutsummaryrefslogtreecommitdiff
path: root/Perl
diff options
context:
space:
mode:
authoretienne2003-02-20 17:47:24 +0000
committeretienne2003-02-20 17:47:24 +0000
commit5dbfd0e8a55369eaeaf0e72ba54aea05391c955d (patch)
tree660f3e2d0d8437fdc59fdea16382a0f86620fbe2 /Perl
parent5f3e7195bf624f418948ca3c92a136f571e8acfe (diff)
downloadtkzinc-5dbfd0e8a55369eaeaf0e72ba54aea05391c955d.zip
tkzinc-5dbfd0e8a55369eaeaf0e72ba54aea05391c955d.tar.gz
tkzinc-5dbfd0e8a55369eaeaf0e72ba54aea05391c955d.tar.bz2
tkzinc-5dbfd0e8a55369eaeaf0e72ba54aea05391c955d.tar.xz
* Correction de bug : perte du focus quand on a une seule instance de zinc.
Diffstat (limited to 'Perl')
-rw-r--r--Perl/Zinc/Debug.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Perl/Zinc/Debug.pm b/Perl/Zinc/Debug.pm
index bfef8aa..6b92f45 100644
--- a/Perl/Zinc/Debug.pm
+++ b/Perl/Zinc/Debug.pm
@@ -54,6 +54,11 @@ my @instances;
sub BEGIN {
# test if ZincDebug is loaded using the -M perl option
$preload = 1 if (caller(2))[2] == 0;
+ return unless $preload;
+ # parse ZincDebug options
+ my @options = @ARGV;
+ use Getopt::Long;
+
}
# Hack to capture the instance of zinc. ZincDebug functions are invoked here.
@@ -1496,7 +1501,7 @@ sub showinstancehelp {
my $zinc = shift;
my $title = shift;
my $singleflag = shift;
- $zinc->Tk::focus;
+ &takefocus($zinc);
$help_tl{$zinc}->destroy if $help_tl{$zinc} and Tk::Exists($help_tl{$zinc});
if ($singleflag) {
$help_tl{$zinc} = $zinc->Toplevel;
@@ -1775,6 +1780,7 @@ sub takefocus {
sub newinstance {
my $zinc = shift;
return if $instances{$zinc};
+ &takefocus($zinc);
$instances{$zinc} = 1;
push(@instances, $zinc);