WindowState := TWindowState.wsMinimized has no effect
Issue #99
resolved
Under Windows and MAC OK, but not under Linux.
Comments (4)
-
-
repo owner - changed status to resolved
0.99m
-
the windows state change is handled by the platform (FmuxSetWindowState in case of Linux)...
I use this hack
if Form.WindowState = TWindowState.wsMaximized then begin {$IF DEFINED(OSX) OR DEFINED(LINUX)} Form.SetBounds(FNormalState); {$IFEND} Form.WindowState := TWindowState.wsNormal end else begin {$IF DEFINED(OSX) OR DEFINED(LINUX)} FNormalState := Form.Bounds; Form.SetBounds(Screen.WorkAreaRect); {$IFEND} Form.WindowState := TWindowState.wsMaximized; end;
it works more or less under Linux (Top/Left are not restored)
-
TWindowState.wsMaximized does not work on macOS, that I reported it to Embarcadero: https://quality.embarcadero.com/browse/RSP-18083
Thank you for your tip, I am using the MainForm.SetBounds(Screen.WorkAreaRect); instead of MainForm.WindowState:=TWindowState.wsMaximized;
It works fine on all platforms I am using (Windows, macOS, Linux).
- Log in to comment
Harry,
TWindowState.wsMaximized does not work (also), but it is not the fmxLinux problem. I reported it to Embarcadero: https://quality.embarcadero.com/browse/RSP-18083