diff options
author | ribet | 2009-06-26 09:50:18 +0000 |
---|---|---|
committer | ribet | 2009-06-26 09:50:18 +0000 |
commit | 24011d3c489115853fa81339d3b395db1a829733 (patch) | |
tree | 6ab005c19e2a675ad5291a6cd6283c91b939e9a2 | |
parent | b488bfc01282d3dd3b71b29d5b971cf6a0b184fb (diff) | |
download | mtc-24011d3c489115853fa81339d3b395db1a829733.zip mtc-24011d3c489115853fa81339d3b395db1a829733.tar.gz mtc-24011d3c489115853fa81339d3b395db1a829733.tar.bz2 mtc-24011d3c489115853fa81339d3b395db1a829733.tar.xz |
Prise en compte de la variable DISPLAY
-rw-r--r-- | src/MTools.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/MTools.pm b/src/MTools.pm index aa8d94e..043975d 100644 --- a/src/MTools.pm +++ b/src/MTools.pm @@ -120,7 +120,13 @@ sub new { if (!defined $Zinc) { - $screen = ":0.0" if (!defined $screen); + if (!defined $screen) { + if (defined $ENV{DISPLAY}) { + $screen = $ENV{DISPLAY}; + } else { + $screen = ":0.0"; + } + } $self -> {window} = my $mw = MainWindow -> new ('-screen' => $screen); $mw -> title($title); |