防止窗口重绘
是否可以防止窗口自动重绘?我希望它仅在我发出queue_draw()时重绘。
说明: 我需要这个,因为我正在使用工业图形的第 3 方商业库,我可以告诉它何时重绘,而且当 X 告诉它时它也会重绘,并且不可能阻止这种情况。因此,由于应用程序特定的要求,我需要防止这种情况发生,并仅在我告诉它时才重绘。
is it possible to prevent automatic redrawing of window? I want it to redraw only when I issue queue_draw().
Explanation:
I need this because I'm using a 3rd party commercial library for industrial graphics which I can tell when to redraw, but also it redraws when X tells it to and it is not possible to prevent that. Therefore, I need to prevent that because of an app-specific requirements and make it redraw only when I tell it to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,有什么意义呢?如果你不让它自动重绘,你将无法最小化/最大化窗口,将其从后台移动到前台......如果这些动作永远不会发生,那么你的窗口只有在以下情况下才被重绘:你调用queue_draw。只需在
expose-event
处理程序中添加一些跟踪代码,您就会看到它。所以我认为你正在为错误的问题寻找错误的解决方案。
编辑:
所以你需要的可能是 GTK_APP_PAINTABLE 旗帜。
Well, what's the point? If you don't make it redraw automatically, you'll be unable to minimize/maximize the window, move it from the background to the foreground... And if these are actions that never happen, then your windows is already redrawn only when you call queue_draw. Just add some trace code in the
expose-event
handler, and you'll see it.So I think your're looking to at the wrong solution for the wrong problem.
Edit:
so what you need may be the GTK_APP_PAINTABLE flag.