maximization problem

Hi

I wanted to define in my config some vertical and horizontal maximization functions respectively attached to the buttons 3 and 5 of the windows.

I did:

[code]Mouse 0 3 A Maximize-Vert
Mouse 0 5 A Maximize-Horiz

AddToFunc Maximize-Vert

  • C Maximize 0 100

AddToFunc Maximize-Horiz

  • C Maximize 100 0

[/code]

Well ti works but if I maximize vertically a window and after try to maximize it horizontally, it goes back to the unmaximized state when I click on 5… Well I do not know how I can have the right behavior, that means, if I click on 3, the window is maximized vertically and then in this state, if I click on 5, I want to window to be put in full maximization!

Best regards, Brice

I suggest storing state of the window using “State” function. I don’t if there are direction to respects with these values; I used 1 to store horizontal zoom and 2 for vertical. However, to use that, any other function that perform maximization must use the functions *Zoom

[code]# State 1 : horizoom 2 : vertzoom

DestroyFunc DoHorizoom
AddToFunc DoHorizoom

  • I State 1 true
  • I Maximize true 100 0

DestroyFunc DoVertzoom
AddToFunc DoVertzoom

  • I State 2 true
  • I Maximize true 0 100

DestroyFunc DoZoom
AddToFunc DoZoom

  • I State 2 true
  • I State 1 true
  • I Maximize true 100 100

DestroyFunc DontZoom
AddToFunc DontZoom

  • I State 1 false
  • I State 2 false
  • I Maximize false

DestroyFunc Vertical
AddToFunc Vertical

  • I Current (State 2) Function DontVertzoom
  • I TestRc Function DoZoom

DestroyFunc Horizontal
AddToFunc Horizontal

  • I Current (State 1) Function DontHorizoom
  • I TestRc Function DoZoom[/code]

You have to bind button 3 and 5 to functions Vertical and Horizontal.

Hummm

I think some of your code is missing, i.e. DontZoomhorizoom and DontZoom isn’t used here.

But anyway merci beaucoup!!!

Brice

AAAAAHHHHHHH

definitively no ways of getting it working!!!

If someone has an idea, it’s welcome…

Regards, Brice

Hi

I got it working with the following (was quite a headache!!!):

[code]AddToFunc ZoomH

  • I State 1 true
  • I State 2 false
  • I State 3 false
  • I Maximize true 100 0

AddToFunc ZoomV

  • I State 1 false
  • I State 2 true
  • I State 3 false
  • I Maximize true 0 100

AddToFunc Zoom

  • I State 1 false
  • I State 2 false
  • I State 3 true
  • I Maximize true 100 100

AddToFunc NoZoomH

  • I State 1 false
  • I State 3 false
  • I Maximize false 100 0

AddToFunc NoZoomV

  • I State 2 false
  • I State 3 false
  • I Maximize false 0 100

AddToFunc NoZoom

  • I State 1 false
  • I State 2 false
  • I State 3 false
  • I Maximize false 100 100

AddToFunc Maximize-Horiz

  • I Current (State 1) Function NoZoomH
  • I TestRc (Match) Break
  • I Current (State 2) Function Zoom
  • I TestRc (Match) Break
  • I Current (State 3) Function NoZoom
  • I TestRc (Match) Function ZoomV
  • I TestRc (Match) Break
  • I Current (!State 1) Function ZoomH
  • I TestRc (Match) Break

AddToFunc Maximize-Vert

  • I Current (State 2) Function NoZoomV
  • I TestRc (Match) Break
  • I Current (State 1) Function Zoom
  • I TestRc (Match) Break
  • I Current (State 3) Function NoZoom
  • I TestRc (Match) Function ZoomH
  • I TestRc (Match) Break
  • I Current (!State 2) Function ZoomV
  • I TestRc (Match) Break

AddToFunc Maximize-Full

  • I Current (!State 3) Function Zoom
  • I TestRc (Match) Break
  • I Current (State 3) Function NoZoom
  • I TestRc (Match) Break
    [/code]

With that, you can maximize completely the window in 2 steps, i.e. vertically first and then horizontally, after that if you click on the mouse binding for Maximize-Vert (for example), the window goes back to the Maximize-Horiz state (after passing by the non-maximized stated unfortunately… the only thing I didn’t fix).

The Maximize-Full is used in replacement of the Maximize function.

Regards, Brice

If anyone is interested, here is my solution to the problem of “normal” horizontal/vertical maximization. It is similar to the previous solution (I also ended up using State commands), and has the same behaviour (as far as I know). I hope someone finds it useful.

[code]# resize functions

horizontal maximise

DestroyFunc Hmax
AddToFunc Hmax

  • I State 1 True
  • I State 2 False
  • I State 3 False
  • I Current Maximize True 100 0

vertical maximise

DestroyFunc Vmax
AddToFunc Vmax

  • I State 1 False
  • I State 2 True
  • I State 3 False
  • I Current Maximize True 0 100

maximise

DestroyFunc Max
AddToFunc Max

  • I Current (State 3) Unmax
  • I TestRc (Match) Break
  • I State 1 False
  • I State 2 False
  • I State 3 True
  • I Current Maximize True 100 100

unmaximise

DestroyFunc UnMax
AddToFunc UnMax

  • I State 1 False
  • I State 2 False
  • I State 3 False
  • I Current Maximize False

horizontal maximise, toggle

DestroyFunc HorizontalMax
AddToFunc HorizontalMax

  • I Current (State 1) UnMax
  • I TestRc (Match) Break
  • I Current (State 2) Max
  • I TestRc (Match) Break
  • I Current (State 3) UnMax
  • I Testrc (Match) Vmax
  • I TestRc (Match) Break
  • I Current Hmax
    Key 7 A 4 HorizontalMax

vertical maximise, toggle

DestroyFunc VerticalMax
AddToFunc VerticalMax

  • I Current (State 1) Max
  • I TestRc (Match) Break
  • I Current (State 2) UnMax
  • I TestRc (Match) Break
  • I Current (State 3) Unmax
  • I TestRc (Match) Hmax
  • I TestRc (Match) Break
  • I Current Vmax
    Key 8 A 4 VerticalMax[/code]