summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-11 08:58:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-11 08:58:40 +0000
commit42787612c917e1fb43daab74d30bd7b2acfbc35d (patch)
treefae3eb412573b515ec2dfede036d1c963e3c141b /perl-install/ugtk2.pm
parent79071d4f69624e551dfac70c8c89c659767ed86e (diff)
downloaddrakx-backup-do-not-use-42787612c917e1fb43daab74d30bd7b2acfbc35d.tar
drakx-backup-do-not-use-42787612c917e1fb43daab74d30bd7b2acfbc35d.tar.gz
drakx-backup-do-not-use-42787612c917e1fb43daab74d30bd7b2acfbc35d.tar.bz2
drakx-backup-do-not-use-42787612c917e1fb43daab74d30bd7b2acfbc35d.tar.xz
drakx-backup-do-not-use-42787612c917e1fb43daab74d30bd7b2acfbc35d.zip
remove $ugtk2::force_center_at_pos, inline it instead
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index ff2aa3d8f..920a4dfe1 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -2,7 +2,7 @@ package ugtk2;
use diagnostics;
use strict;
-use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $wm_icon $force_center_at_pos $force_focus $grab $border); #- leave it on one line, for automatic removal of the line at package creation
+use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $wm_icon $force_focus $grab $border); #- leave it on one line, for automatic removal of the line at package creation
@ISA = qw(Exporter);
%EXPORT_TAGS = (
@@ -969,19 +969,18 @@ sub _create_window {
require install_gtk; #- for perl_checker
install_gtk::handle_unsafe_mouse($::o, $w);
$w->signal_connect(key_press_event => \&install_gtk::special_shortcuts);
- }
- if ($force_center_at_pos) {
+ #- force center at a weird position, this can't be handled by position_policy
+ #- because center-on-parent is a window manager hint, and we don't have a WM
my ($wi, $he);
-
$w->signal_connect(size_allocate => sub {
my (undef, $event) = @_;
my @w_size = $event->values;
return if $w_size[2] == $wi && $w_size[3] == $he; #BUG
(undef, undef, $wi, $he) = @w_size;
-
- my ($X, $Y, $Wi, $He) = @$force_center_at_pos;
- $w->set_uposition(max(0, $X + ($Wi - $wi) / 2), max(0, $Y + ($He - $he) / 2));
+
+ $w->set_uposition(max(0, $::rootwidth - ($::windowwidth + $wi) / 2),
+ max(0, $::logoheight + ($::windowheight - $he) / 2));
});
}