如何修复 Java-GUI 程序(swing),使其与 Awesome-wm 一起使用?
Java 程序的 swing-UI 不能与 awesome-wm 完美配合。 Awesome 是 UNIX 的窗口管理器,它自动调整程序窗口的大小,而 Swing-UI 无法正确识别这些调整大小。 我不在乎 Awesome 或 Java 是否有罪,我想知道我是否可以以某种方式改变我的 Java 程序,让它们能够与 Awesome 一起工作。 这样我的程序的用户即使使用异国情调的窗口管理器也能获得正确的体验。
The swing-UI of Java-programs doesn't work perfectly together with the awesome-wm. awesome is a window-manager for UNIX, that automatically resizes program-windows, and the Swing-UI doesn't recognize these resizes correctly. I don't care if awesome or Java is guilty, what I wanna know if I can change my Java-programs in a way, that they will work with awesome. So that users of my programs get the correct experience, even when they use exotic window-managers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
最简单的解决方法 - 获取 wmname fromuckless 并使用它将窗口管理器的名称设置为 LG3D:
98%到时候这将解决这个问题。
Easiest workaround - get wmname from suckless and use it to set the name of the window manager to LG3D:
98% of the time this will fix the issue.
来自 Awesome 的手册页:
From the man page of awesome:
您可能发现这与使用 Compiz 和 Java(至少在 Ubuntu 上)遇到的问题类似,但我猜测。
解决此问题的方法(取自此处)是将以下环境变量添加到您的程序:
You might find that this is a similar problem to that experienced with using Compiz and Java (on Ubuntu at least), but I am guessing.
The fix for this (taken from here) is to add the following environment variable to your program: