gpt4 book ai didi

c++ - 如何在 XWindows 中获取装饰窗口的内部尺寸?

转载 作者:太空宇宙 更新时间:2023-11-04 04:09:20 25 4
gpt4 key购买 nike

如果我创建一个全屏窗口,其中 m_winwm_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 上。

最佳答案

参见 XGetWindowAttributes、XGetGeometry。根据手册页:

The width and height members are set tothe inside size of the window, not including the border.

关于c++ - 如何在 XWindows 中获取装饰窗口的内部尺寸?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1264010/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com