如何在 XWindows 中获取装饰窗口的内部尺寸?
如果我创建一个全屏窗口,其中 m_winw 和 m_winh 是全屏尺寸,那么它似乎为我创建了一个窗口,其中外部尺寸是全屏,内部尺寸是根据“装饰”(窗口边框)尺寸较小。 有没有办法查询窗口以获取其内部宽度和高度?
m_win=XCreateWindow(m_display, m_rootwin, m_winx, m_winy, m_winw, m_winh, 0,
CopyFromParent,CopyFromParent,m_visual,CWColormap|CWEventMask,&attributes);
这是在linux上的。
If I create a full screen window where m_winw and m_winh is the full screen size, it seems to create a window for me where the outside dimension is the full screen and the inside is smaller based on the "decoration" (window border) size. Is there a way to query the window to get it's inside width and height?
m_win=XCreateWindow(m_display, m_rootwin, m_winx, m_winy, m_winw, m_winh, 0,
CopyFromParent,CopyFromParent,m_visual,CWColormap|CWEventMask,&attributes);
This is on linux.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅 XGetWindowAttributes、XGetGeometry。 根据手册页:
See XGetWindowAttributes, XGetGeometry. According to the man page: