- wait for the widget to be displayed before doing the delay that
authorTony Cook <tony@develop-help.com>
Sun, 13 Apr 2008 09:10:29 +0000 (09:10 +0000)
committerTony Cook <tony@develop-help.com>
Sun, 13 Apr 2008 09:10:29 +0000 (09:10 +0000)
  takes the screenshot.  This forces the widget to be displayed on
  loaded machines.
  Thanks to Slaven Rezic.
  https://rt.cpan.org/Ticket/Display.html?id=34792

Changes
t/30tkx11.t

diff --git a/Changes b/Changes
index 433d0a52676cc34528a372b8b139bed511e257c0..73ba2968b6fed9ea7313d17127f8def50dd90be6 100755 (executable)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,11 @@
+0.007 unreleased
+
+- wait for the widget to be displayed before doing the delay that
+  takes the screenshot.  This forces the widget to be displayed on
+  loaded machines.
+  Thanks to Slaven Rezic.
+  https://rt.cpan.org/Ticket/Display.html?id=34792
+
 0.006 9 Apr 2008
 
 - screenshot() on a non-toplevel Tk widget would crash when
index 1b896b9580e96fba598bbd051b2dde27949ab56a..5f29a85ffe95faa5e456a234bcbca616b1f567bb 100644 (file)
@@ -29,6 +29,7 @@ plan tests => 2;
 
 my ($im_mw, $im_label);
 my $label = $mw->Label(-text => "test: $0")->pack;
+$label->waitVisibility;
 $mw->after(100 =>
            sub {
              $im_mw = screenshot(widget => $mw, decor => 1)