Jump to content
  • Advertisement
Sign in to follow this  
incertia

Adjusting window sizes in X11

This topic is 587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Under Windows platforms, we have access to AdjustWindowRectEx to make sure that the client area has the desired size. Due to the diversity of window managers available on Linux systems, is there a way to have X11 ask the current window manager what the correct properties should be to get the desired client area, or should we wait for the first expose event to determine the correct settings?

 

On a related note, is there a way to impose window size restrictions in X11? Or is it up to the window manager to honor the WM_NORMAL_HINTS property?

Share this post


Link to post
Share on other sites
Advertisement

is there a way to have X11 ask the current window manager what the correct properties should be to get the desired client area

 

XCreateWindow() and XResizeWindow() and related functions use width and height values for the client area.  They already are the internal window sizes. Any frames from the window manager are in addition to the values specified as width and height.

Share this post


Link to post
Share on other sites

Hmm, so if a window manager desides to grow a border internally, that should be a bug? My current issue is with XMonad, where I have configured it to give floating windows a border width of two pixels, and the client area shrinks to make room for the border.

Share this post


Link to post
Share on other sites

Okay so it looks like a window manager issue. Launching X without a window manager creates the borders on the outside.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!