如何在 Ubuntu 上打开一个未修饰的全屏窗口 [英] How to open a non-decorated fullscreen window on Ubuntu

查看:32
本文介绍了如何在 Ubuntu 上打开一个未修饰的全屏窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Ubuntu 上打开一个未修饰的全屏窗口的技巧是什么?我曾经将 _NET_WM_STATE 属性更改为 _NET_WM_STATE_FULLSCREEN 来实现这一点,但是虽然在 KDE 上运行良好,但它似乎不适用于 Ubuntu(GNOME;使用 12.04 LTS 测试).左侧的启动器和标题栏仍然存在并出现在我未装饰的全屏窗口上方,这不是我想要的.

What is the trick to open a non-decorated fullscreen window on Ubuntu? I used to change the _NET_WM_STATE property to _NET_WM_STATE_FULLSCREEN to achieve this but while working fine on KDE it doesn't seem to work on Ubuntu (GNOME; tested with 12.04 LTS). The launcher on the left and the title bar are still there and appear above my non-decorated fullscreen window which is not what I want.

然而,当在 Firefox 中切换到全屏模式时,Firefox 的全屏窗口会覆盖整个屏幕,包括启动器面板和标题栏,因此必须能够以某种方式打开覆盖整个屏幕的窗口,包括 Ubuntu 的启动器和标题栏.

When switching to fullscreen mode in Firefox, however, Firefox's fullscreen window covers the complete screen including launcher panel and title bar so it must be possible somehow to open windows that cover the entire screen, including Ubuntu's launcher and title bar.

有人能解释一下如何在没有任何中间件的情况下使用普通的 X11 实现这种行为吗?

Could anybody explain how to achieve this behaviour using plain X11 without any middleware?

谢谢!

推荐答案

Gnome 默认设置窗口最大大小,使其不覆盖面板.除非您删除 WM_NORMAL_HINTS 中的相应提示,或者将最小尺寸和最大尺寸都设置为您的屏幕尺寸,否则它不会将您的窗口大小调整到超过该尺寸.

Gnome by default sets window max size such that it does not cover the panel. It won't resize your window beyond that size, unless you remove the corresponding hint in WM_NORMAL_HINTS, or set both min size and max size to your screen dimensions.

参见例如此处此处.

这不会在 KDE 或任何其他 DE 上伤害您.

This will not hurt you on KDE or any other DE either.

记得在退出全屏模式时重置最小尺寸.

Remember to reset min size when you exit full screen mode.

这篇关于如何在 Ubuntu 上打开一个未修饰的全屏窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆