I have the following minimal config to show the problem I am facing.
EwmhBaseStruts 0 0 0 0
DesktopSize 1x1
Style * MaxWindowSize $[vp.width]p $[vp.height]p
Style * ResizeHintOverride
Key G A M FuncLaunchGeeqie
DestroyFunc FuncLaunchGeeqie
AddToFunc FuncLaunchGeeqie
+ I None (Geeqie) Exec exec geeqie
+ I TestRc (Match) Wait Geeqie
+ I Next (Geeqie) Focus
+ I Current Raise
+ I Current WindowStyle !Borders, !Handles
#+ I Current Maximize Fullscreen True
#+ I Current Maximize True
+ I Current ResizeMove 100 100 0 0
This function should check to see if Geeqie is running first. If it isn’t, start running Geeqie and wait for it to load. Then grab the ‘Next’ Geeqie window, as it should be the only instance (regardless of it was already running or had to be started). Then focus it, causing the Geeqie window to now be referenced with ‘Current’. Then ‘Raise’ the window, in case it was already running but was hidden under other windows. Then strip all borders and handles and maximize the window.
If I run the command with ‘Maximize True’ or ‘ResizeMove 100 100 0 0’, it loads Geeqie, waits for it, gives it focus, raises and maximizes it with a gap in the lower right corner. Coordinate x is short by 14p and coordinate y is short by 33p.
When you run the ‘Maximize Fullscreen True’, it maximizes Geeqie properly.
The problem is, this is not just for Geeqie, it will be used for other applications like Firefox. With Firefox, ‘Maximize Fullscreen true’, doesn’t maximize the window, but puts it in fullscreen mode (equivalent to F11 in Firefox).
Is ‘Maximize True’ and ‘Resize 100 100 0 0’ broken, am I using them wrong or is this their desired effect?
I’m not sure what I could be doing wrong with such a small configuration. The weird thing is the latter part of the function just focuses, raises and maximizes the application properly. It is just the first run of the command the shorts ‘Maximize’.
Does this mean I will have to run the ‘Maximize/ResizeMove’ command twice when first loading Geeqie?
EDIT: Just tested it and running the ‘Maximize/ResizeMove’ command twice doesn’t fix the problem.
EDIT 2: I just added removing the title along with the handles and border to see what happens. The gap at the bottom, on first load is bigger. So it looks like on first ‘Maximize’ that is thinks the border, handles and title are still active and that’s why there’s a gap? And the second run with the command fixes the gap?
EDIT 3: For some reason, when there is a gap after the initial loading, if you restart fvwm3, the gap disappears without running the function again. I don’t know if this helps anybody.
EDIT 4: Ok, when the gap is there on first load, both $[cw.height] and $[w.height] list the same value and I don’t think they should be, from what I read.