Maximize a window and remove borders


I like the style of window with rather thick borders - 10px. But when a window is maximized there is no point in occupying so much space by borders. Therefore I created a small function that removes borders when a window is maximized.
Currently it looks like this:

DestroyFunc myMaximize
AddToFunc myMaximize

  • I Current (!Maximized) WindowStyle !Handles !Borders
  • I Current (Maximized) WindowStyle Handles Borders
  • I Current (!Maximized) WindowStyle HandleWidth 0 BorderWidth 0
  • I Current (Maximized) WindowStyle HandleWidth 10 BorderWidth 10
  • I Current Maximize

The problem is a window is maximized leaving 20px wide space on the right and on the bottom. I think it gets maximized counting that borders are still present.

Please help me to resolve the issue.

Yet another person who’s reinvented this.

You want the ResizeHintOverride style condition.

– Thomas Adam

Thomas thank you for the reply.

I added the following line in my config:

Style * ResizeHintOverride

but unfortunately that did not do anything. Windows are not maximized to the full screen.

Please help me as I am novice and I am having hard time finding information.

Thank you in advance.

I figured it out.

I needed UpdateStyles command after removing borders.


I think what I’ll do is add the ability to do this in FVWM directly.

– Thomas Adam