diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-08-30 16:20:40 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-24 21:28:36 +0100 |
commit | 45338bd2f691b8fc61665daefd2bd30767bf742d (patch) | |
tree | 4eaa4c7b7a226d752b49dc45d7030ab878842a61 /perl-install/mygtk3.pm | |
parent | 527a624d8825348bcd9bd2ec0005409a89230315 (diff) | |
download | drakx-45338bd2f691b8fc61665daefd2bd30767bf742d.tar drakx-45338bd2f691b8fc61665daefd2bd30767bf742d.tar.gz drakx-45338bd2f691b8fc61665daefd2bd30767bf742d.tar.bz2 drakx-45338bd2f691b8fc61665daefd2bd30767bf742d.tar.xz drakx-45338bd2f691b8fc61665daefd2bd30767bf742d.zip |
(root_window_size) introduce it
Diffstat (limited to 'perl-install/mygtk3.pm')
-rw-r--r-- | perl-install/mygtk3.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm index 6d75baec7..ccbd23e27 100644 --- a/perl-install/mygtk3.pm +++ b/perl-install/mygtk3.pm @@ -1491,6 +1491,12 @@ sub root_window() { $root ||= Gtk3::Gdk::get_default_root_window(); } +sub root_window_size() { + state $root; + $root ||= [Gtk3::Gdk::Screen::width, Gtk3::Gdk::Screen::height]; + @$root; +} + sub rgb2color { my ($r, $g, $b) = @_; my $color = Gtk3::Gdk::Color->new($r, $g, $b); |