How to open a non-decorated fullscreen window on Ubuntu

拟墨画扇 提交于 2019-12-11 00:54:45

问题


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.

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.

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

Thanks!


回答1:


I've found the problem. Setting _NET_WM_STATE_FULLSCREEN is not enough. One should also set the override_redirect attribute to TRUE to prevent the window manager from intercepting configure and map requests which seems to be exactly what GNOME is doing on Ubuntu by putting the launcher panel and title bar over my fullscreen window. Setting override_redirect to TRUE prevents this.




回答2:


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.

See e.g. here or here.

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

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



来源:https://stackoverflow.com/questions/24288711/how-to-open-a-non-decorated-fullscreen-window-on-ubuntu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!