WindowState := TWindowState.wsMinimized has no effect

Issue #99 resolved
Harry Stahl created an issue

Under Windows and MAC OK, but not under Linux.

Comments (4)

  1. Paul TOTH

    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)

  2. Zoltan Karpati

    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).

  3. Log in to comment