How to do double click title bar = maximize?

well, here’s another thing I’m trying to do that seems pretty simple. I know it involves making a custom function to be invoked when clicking the title bar, but I’m sure there’s someone out there who already has implemented in the .fvwm2rc and share some code with me.

Note, I am using 2.4.19.

I want a double click on the title bar of a window to cause that window to be maximized. Currently I associate maximizing with my maximize button:

Mouse 0 4       A       Maximize true 100 -30p

But I would like that “Maximize true 100 -30p” part to result when the title bar is double-clicked. Single clicking the titlebar should bring the window to focus, and dragging the title bar should move the window.

Any help?

–Brian

Here’s just a quick example of how it could be

[code]Mouse 1 T A Maximize-or-Move
AddToFunc Maximize-or-Move

  • D Maximize
  • C Raise
  • C Focus
  • M Move[/code]

D stands for double click
C for click
M for move

A downside with this is that you have to wait “Clicktime” milliseconds before it raises and focuses a window

Taily, thanks for the tip! Looking at you function, I realized that one of the functions in the default fvwm2rc was conflicting with what I wanted to do…looks like it is working now!!! :slight_smile: :slight_smile:

–Brian

True, what I do in similar cases is to never use C and D in the same function, that makes the Click faster. Instead of that I just use single clicks in different buttons. For example, I like to bind:

Mouse 1 T A Move
Mouse 2 T A Maximize 100 100
.......
Mouse 1 5 A Maximize 100 100
Mouse 2 5 A Maximize 100 0
Mouse 3 5 A Maximize 0 100
.......
Mouse 1 1 A Close
Mouse 2 1 A Delete
Mouse 3 1 A Destroy

You get the idea. This way I avoid using functions when not needed and I dont have to suffer the delay when single clicking. I just could not stand that so I decided to go single click, I feel so comfortable once I have become accustomed.

Of course, to each one his/her own :wink:

  • Best regards.

I have the same question. Could not figure out the answer. This works for a single click.
Mouse 1 T A Maximize 90 85 # (width height)

How it is for a double click?