KPexEA
KPexEA

Reputation: 16778

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

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.

Upvotes: 1

Views: 355

Answers (1)

AProgrammer
AProgrammer

Reputation: 52314

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.

Upvotes: 1

Related Questions