From 5bbec3f3d0ed92818c34af72b3544bcef1be8cff Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 6 Nov 2013 18:15:22 +0100 Subject: fix computing parent_window/root_window height --- perl-install/mygtk3.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'perl-install/mygtk3.pm') diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm index 6fcc192de..ac7c09f78 100644 --- a/perl-install/mygtk3.pm +++ b/perl-install/mygtk3.pm @@ -736,8 +736,14 @@ sub _gtk__MDV_Notebook { import_style_ressources(); my ($layout, $selection_arrow, $selection_bar); - my $parent_window = delete $opts->{parent_window} || root_window(); - my $root_height = first($parent_window->get_size); + my @size; + if ($opts->{parent_window}) { + my $pw = delete $opts->{parent_window}; + @size = $pw->get_allocated_width; + } else { + @size = root_window_size(); + } + my $root_height = first(@size); my $suffix = $root_height == 800 && !$::isStandalone ? '_600' : '_768'; # the white square is a little bit above the actual left sidepanel: my $offset = 20; -- cgit v1.2.1