How to get the inside dimensions of a decorated window in XWindows?

343 views Asked by At

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.

1

There are 1 answers

0
AProgrammer On

See XGetWindowAttributes, XGetGeometry. According to the man page:

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