java窗口覆盖,Java全屏在Linux上 – 如何覆盖任务栏?

There is no Linux Desktop

Linux-based operating systems on PC-type machines, as well as other Unices (with a partial exception for MacOSX), normally use the X Window System (aka X11). Under X, you have an X Server (usually, something kinda like a “video driver”) and clients that connect to it, more often than not, from the same machine (loopback).

The layout and placement of windows is controlled by a special client program, called the Window Manager. It’s responsible for decorating the windows (e.g. drawing title bars or resize handles) and positioning them.

Your program would be an X client. It can request — but not demand — placement on the screen at a certain position, or a certain size. Various Window Managers are more (or less) prone to giving you what you want.

Except, most desktops play nicely (sometimes)

Now, by far, most Linux desktops use the Gnome Desktop, with a strong second place for the K Desktop, and a few others are in fairly wide use. What’s “nice” is that both of these desktop environments (as well as some others, like XFCE for low-end PC’s) conform to the FreeDesktop.org Window Manager Hints standards.

(Super-over-simplification:) Typically, there will be Panels on one or more edges of the screen. Usually, there’s just one, across the top, but there are many variations. These Panel areas are not considered “part of the screen,” so the Window Manager tells your application, “no, that’s outside of the area in which you’re allowed to play; this screen is not 1920×1080, it’s only 1890×1080.” Of course, that could be totally different arrangement than what you’d anticipated when you wrote your app, and you might be on my netbook with a physical screen of 800×480 pretending to be only 780×480.

For 99% of apps, that’s great. Windows don’t get in the way of the Panels, so you can always reach the Panel for critical controls, like hitting Mute or switching to another program or something.

These “hints” allow you to request that your top-level windows get treated specially. For example, you can request that you get no title bar — or a reduced, “palette” type title bar; you can request to be skipped on the window list or task bar or activities overview or whatever other interface might be used to show the active windows; or, you can request to go really full-screen, and push everything else out of the way, even panels.

The spec is here: 07001

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值