<p dir="auto">In our app we need to record the window size and position depending on whether the window is maximised. However, there is a problem when setting the window resizable to false. As shown below:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/13615512/13042423/df71e520-d40b-11e5-9335-b5cd04b06273.png"><img src="https://cloud.githubusercontent.com/assets/13615512/13042423/df71e520-d40b-11e5-9335-b5cd04b06273.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">OS: OS X Yosemite 10.10.5 (haven't tested on other platforms)<br>
Electron version: v0.36.7</p>
<p dir="auto">On OSX and Linux, the value from isMinimized() and isMaximized() is not representative of the actual state that the window is in. I have a test suite that I ran on all platforms, the relevant parts are here:</p>
<p dir="auto">as.spec.js:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...

    it('minimize', () =&gt; {
        as.minimize();

        expect(remote.getCurrentWindow().isMinimized()).toBeTruthy();
    });

    it('restore', () =&gt; {
        as.restore();

        expect(remote.getCurrentWindow().isMinimized()).not.toBeTruthy();
    });

    it('maximize', () =&gt; {
        as.maximize();

        expect(remote.getCurrentWindow().isMaximized()).toBeTruthy();
    });

    it('unmaximize', () =&gt; {
        as.unmaximize();

        //there is a bug on OSX where this doesn't work, so skip test on OSX
        if (os.platform() !== 'darwin') {
            expect(remote.getCurrentWindow().isMaximized()).not.toBeTruthy();
        }
    });

..."><pre class="notranslate"><code class="notranslate">...

    it('minimize', () =&gt; {
        as.minimize();

        expect(remote.getCurrentWindow().isMinimized()).toBeTruthy();
    });

    it('restore', () =&gt; {
        as.restore();

        expect(remote.getCurrentWindow().isMinimized()).not.toBeTruthy();
    });

    it('maximize', () =&gt; {
        as.maximize();

        expect(remote.getCurrentWindow().isMaximized()).toBeTruthy();
    });

    it('unmaximize', () =&gt; {
        as.unmaximize();

        //there is a bug on OSX where this doesn't work, so skip test on OSX
        if (os.platform() !== 'darwin') {
            expect(remote.getCurrentWindow().isMaximized()).not.toBeTruthy();
        }
    });

...
</code></pre></div>
<p dir="auto">in the file <code class="notranslate">as</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { remote } from 'electron';

...

    minimize () {
        remote.getCurrentWindow().minimize();
    }

    maximize () {
        remote.getCurrentWindow().maximize();
    }

    restore () {
        remote.getCurrentWindow().restore();
    }"><pre class="notranslate"><code class="notranslate">import { remote } from 'electron';

...

    minimize () {
        remote.getCurrentWindow().minimize();
    }

    maximize () {
        remote.getCurrentWindow().maximize();
    }

    restore () {
        remote.getCurrentWindow().restore();
    }
</code></pre></div>
<p dir="auto">On windows, all of these tests succeed.</p>
<p dir="auto">On Linux the minimize/maximize tests fail, although the window does minimize properly (but fails to maximize). In the dev console window, I can invoke remote.getCurrentWindow().minimize() and isMinimized() and it returns true. However, maximize() doesn't make the window maximize nor does it change the value of isMaximized()</p>
<p dir="auto">On OSX, the unmaximize() test fails and likewise remote.getCurrentWindow.maximize() does not seem to maximize a window when invoked from the dev window.</p>