aboutsummaryrefslogtreecommitdiff
path: root/src/MTools.pm
diff options
context:
space:
mode:
authorribet2009-06-26 09:50:18 +0000
committerribet2009-06-26 09:50:18 +0000
commit24011d3c489115853fa81339d3b395db1a829733 (patch)
tree6ab005c19e2a675ad5291a6cd6283c91b939e9a2 /src/MTools.pm
parentb488bfc01282d3dd3b71b29d5b971cf6a0b184fb (diff)
downloadmtc-24011d3c489115853fa81339d3b395db1a829733.zip
mtc-24011d3c489115853fa81339d3b395db1a829733.tar.gz
mtc-24011d3c489115853fa81339d3b395db1a829733.tar.bz2
mtc-24011d3c489115853fa81339d3b395db1a829733.tar.xz
Prise en compte de la variable DISPLAY
Diffstat (limited to 'src/MTools.pm')
-rw-r--r--src/MTools.pm8
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);