Skip to content

[Mac] Cannot de-maximize a manually maximized form #1512

@msasso69

Description

@msasso69

If I manually maximize a form clicking on the green system buttom to maximize it, I'm no more able to programmatically de-maximize it.
I also noticed that if I programmatically maximize a form with the Maximize() method I don't really maximize it but rather change its dimensions to fit the available screen, it is an intended behaviour?
Anyway both maximized ways of maximizing a form have the WindowState to Maximized.

Expected Behavior

Setting WindowState = WindowState.Normal to a manually maximized form should de-maximize it

Actual Behavior

Setting WindowState = WindowState.Normal to a manually maximized form has no effect

Steps to Reproduce the Problem

  1. run the repro
  2. click on the green system button to maximize the form
    image
  3. click the button "Click Me" of the form
    The code this.WindowState = WindowState.Normal; get executed but the WindowState (and the form) remains Maximized

Code that Demonstrates the Problem

using System;
using Eto;
using Eto.Forms;
namespace VisualSEO.EtoFormGui
{
	public class Program
	{
		[STAThread]
		public static void Main(string[] args)
		{
			new Application(Platform.Detect).Run(new MainForm());
		}

		public class MainForm : Form
		{
			public MainForm()
			{
				this.Width = 500;
				this.Height = 250;
				//this.Maximize();
				Button button1 = new Button() { Text = "Click Me!" };
				button1.Click += (sender, e) =>
				{
					this.WindowState = WindowState.Normal;
				};
				Content = button1;
			}
		}
	}
}

Specifications

  • Version: Eto pull of 25th October 2019
  • Platform(s): XamMac2
  • Operating System(s): macOS 10.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions