- Electron version:
  V.1.2.8
- Operating system:
  Windows 10.1

STAGE 1: I create a browserwindow using:

```
  browserWindow = new BrowserWindow({
    show: false,
    width: 1000,
    height: 600,
    minWidth: 500,
    minHeight: 500,
    frame: process.platform == 'darwin' ? true : false
  });
```

STAGE 2: From within the renderer I call:

```
    import electron from 'electron';
    const window = electron.remote.getCurrentWindow();
    window.setSize(1000, 600, true);
    window.setMinimumSize(500, 500);
    window.setResizable(false);
```

STAGE 3: Then, at a later stage I call:

```
    import electron from 'electron';
    const window = electron.remote.getCurrentWindow();
    window.setMinimumSize(500, 500);
    window.setResizable(true);
    window.maximize();
```

This final step seems to break the browser window in several ways. Windows snap stops working (dragging the window to the top/sides does nothing). And the maximise() command ignores the taskbar (window is behind the taskbar - see below).

![Taskbar above browserwindow](https://www.dropbox.com/s/e56m8gwyiw65gg6/2016-10-20%2010_27_33-.png?dl=1)

When I refresh (only STAGE 3 will run) the window is fixed. Snap works again and maximise() will not ignore the taskbar.

atom/browser/native_window_views.cc
return;
  if (!menu_bar_) {
    gfx::Size content_size = GetContentSize();
    menu_bar_.reset(new MenuBar(this));
    menu_bar_->set_owned_by_client();
    if (!menu_bar_autohide_) {
      SetMenuBarVisibility(true);
      if (use_content_size_) {
        
        extensions::SizeConstraints constraints = GetContentSizeConstraints();
        if (constraints.HasMinimumSize()) {
          gfx::Size min_size = constraints.GetMinimumSize();
          min_size.set_height(min_size.height() + kMenuBarHeight);
          constraints.set_minimum_size(min_size);
        }
        if (constraints.HasMaximumSize()) {
          gfx::Size max_size = constraints.GetMaximumSize();
          max_size.set_height(max_size.height() + kMenuBarHeight);
          constraints.set_maximum_size(max_size);
        }
        SetContentSizeConstraints(constraints);
        
        SetContentSize(content_size);
      }
    }
  }
  menu_bar_->SetMenu(menu_model);
  Layout();
}
void NativeWindowViews::SetParentWindow(NativeWindow* parent) {