- 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
#include "ui/views/widget/native_widget_private.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/client_view.h"
#include "ui/wm/core/shadow_types.h"
#include "ui/wm/core/window_util.h"
#if defined(USE_X11)
#include "atom/browser/browser.h"
#include "atom/browser/ui/views/frameless_view.h"
#include "atom/browser/ui/views/global_menu_bar_x11.h"
#include "atom/browser/ui/views/native_frame_view.h"
#include "atom/browser/ui/x/event_disabler.h"
#include "atom/browser/ui/x/window_state_watcher.h"
#include "atom/browser/ui/x/x_window_utils.h"
#include "base/strings/string_util.h"
#include "chrome/browser/ui/libgtk2ui/unity_service.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/x/x11_types.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
#include "ui/views/window/native_frame_view.h"
#elif defined(OS_WIN)
#include "atom/browser/ui/views/win_frame_view.h"
#include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"
#include "skia/ext/skia_utils_win.h"
#include "ui/base/win/shell.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/display/win/screen_win.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#endif
namespace atom {