Maximize a window and remove borders

Problems with decorations or key/mouse bindings? Or perhaps you have a cool mouse/key binding you want to share.
slonick
Kitten
Kitten
Posts: 3
Joined: Mon Sep 26, 2011 9:49 am

Maximize a window and remove borders

Postby slonick » Mon Sep 26, 2011 10:25 am

Hi!

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.

thomasadam
Administrator
Administrator
Posts: 3046
Joined: Mon Nov 08, 2004 1:12 am
Location: England
Contact:

Re: Maximize a window and remove borders

Postby thomasadam » Mon Sep 26, 2011 2:36 pm

Yet another person who's reinvented this.

You want the ResizeHintOverride style condition.

-- Thomas Adam

slonick
Kitten
Kitten
Posts: 3
Joined: Mon Sep 26, 2011 9:49 am

Re: Maximize a window and remove borders

Postby slonick » Mon Sep 26, 2011 4:57 pm

Thomas thank you for the reply.

I added the following line in my config:

Code: Select all

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.

slonick
Kitten
Kitten
Posts: 3
Joined: Mon Sep 26, 2011 9:49 am

Re: Maximize a window and remove borders

Postby slonick » Mon Sep 26, 2011 5:04 pm

I figured it out.

I needed UpdateStyles command after removing borders.

thomasadam
Administrator
Administrator
Posts: 3046
Joined: Mon Nov 08, 2004 1:12 am
Location: England
Contact:

Re: Maximize a window and remove borders

Postby thomasadam » Mon Sep 26, 2011 5:10 pm

slonick wrote:I figured it out.

I needed UpdateStyles command after removing borders.


No.

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

-- Thomas Adam


Return to “Decorations and bindings”

Who is online

Users browsing this forum: No registered users and 1 guest