Perl tk 主窗口错误

发布于 2024-10-31 20:34:56 字数 732 浏览 0 评论 0原文

我有一个 Perl Tk 应用程序。

如果我移动主窗口,使其不位于屏幕的最上方,那么下次执行以下代码时,脚本将失败:

$canvas_fimage_real=$canvas_fimage->Subwidget('canvas');
$canvas_fimage_real=$canvas_fimage unless $canvas_fimage_real;
my $canvas_id=$canvas_fimage_real->id;

my $canvas_fimage_photo=$main_window::main_window->Photo(-format=>'Window', -data=>oct $canvas_id );

并且失败并显示以下错误消息:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  73 (X_GetImage)
  Serial number of failed request:  2796
  Current serial number in output stream:  2796

脚本崩溃于照片命令。
我该如何解决这个问题?

I have a Perl Tk application.

If I move the main window so that it's not right up to the uppermost part of the screen, then the next time the following code is executed, the script fails:

$canvas_fimage_real=$canvas_fimage->Subwidget('canvas');
$canvas_fimage_real=$canvas_fimage unless $canvas_fimage_real;
my $canvas_id=$canvas_fimage_real->id;

my $canvas_fimage_photo=$main_window::main_window->Photo(-format=>'Window', -data=>oct $canvas_id );

And it fails with the following error message:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  73 (X_GetImage)
  Serial number of failed request:  2796
  Current serial number in output stream:  2796

The script crashes at the Photo command.
How can I fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

薯片软お妹 2024-11-07 20:34:56

这是一个完全在屏幕上的窗口吗?快照功能仅适用于屏幕上可见的内容(低级 X11 条件;不可协商)。因此,您应该提交错误报告,因为快照代码不应该要求它无法获得的东西。

当然,如果窗口完全显示在屏幕上并且您仍然收到该错误消息,那么这是一个严重的问题。在这种情况下也请提交错误报告!

Is this a window that is wholly on the screen? The snapshotting facility only works with what is visible on-screen (a low-level X11 condition; not negotiable). As such, you should file a bug report as the snapshot code shouldn't ask for things that it can't get.

Of course, if the window is fully on screen and you're getting that error message anyway, that's a serious problem. File a bug report in that case too!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文