在pygtk中检测全屏
我希望能够检测用户是否已将我的应用程序设置为全屏。我知道我可以使用 gtk.window.fullscreen() 方法使窗口从代码变为全屏,并且该操作还会发出窗口状态事件信号,但是当我编写回调 我无法区分事件是由全屏请求激活还是由不同事件激活,例如最小化窗口到开始栏。如何检测窗口是否已更改为全屏?
I want to be able to detect if my app has been set to fullscreen by the user. I know I can use the gtk.window.fullscreen()
method to make the window go fullscreen from the code, and the the action also emits a window-state-event signal, but when I wrote the callback I had no way of distinguishing between when the event was activated by a fullscreen request or by a different event like for example minimizing the window to the start bar. How can I detect whether the window has been changed to full screen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需检查事件详细信息 。
changed_mask
。new_window_state
。通常这会翻译成以下代码:
You just need to check the event details.
changed_mask
.new_window_state
.Usually this translates into the following code: