X11。如何知道窗户的完整尺寸(及其装饰物的尺寸)
我想检索 X11 中任何窗口的完整大小,以便自动调整其大小。
到目前为止我已经使用了wmctrl,但大小似乎不完整。 例如,
>$ wmctrl -lG
0x00e0000f -1 0 0 1920 1200 tclogin1 KDE Desktop
0x010000ee -1 0 1160 1920 40 tclogin1 kicker
0x01200008 0 4 28 1920 1127 tclogin1 ...p7zip_9.13/bin - Shell No. 8 - Konsole
Kicker 高度为 40,屏幕分辨率为 1920x1200,因此如果我想调整 Konsole 的大小以占据所有屏幕,但 Kicker 的大小应为 1920x1160 (1200-40)。
但当我这样做时,Konsole 会与踢球器尺寸重叠。 所以我认为这意味着这里可能不考虑窗户装饰。
我如何知道必须添加到 wmctrl 给出的窗口大小的装饰的大小?
谢谢
I would like to retrieve the complete size of any windows in X11 in order to automatically resize it.
So far I have used wmctrl but the size seems to be incomplete.
for instance
>$ wmctrl -lG
0x00e0000f -1 0 0 1920 1200 tclogin1 KDE Desktop
0x010000ee -1 0 1160 1920 40 tclogin1 kicker
0x01200008 0 4 28 1920 1127 tclogin1 ...p7zip_9.13/bin - Shell No. 8 - Konsole
The Kicker height is 40 and the screen resolution is 1920x1200 so If I wanted to resize my Konsole to take all the screen but the kicker its size should be 1920x1160 (1200-40).
But when I do that, the Konsole overlaps the kicker size.
So I assume that its means that the windows decorations might not be taken into account here.
How can I know the size of the decorations that I would have to add to the windows size given by wmctrl ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)