- 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
options.Get(options::kType, &window_type);
#if defined(USE_X11)
  
  window_state_watcher_.reset(new WindowStateWatcher(this));
  
  bool use_dark_theme = false;
  if (options.Get(options::kDarkTheme, &use_dark_theme) && use_dark_theme) {
    XDisplay* xdisplay = gfx::GetXDisplay();
    XChangeProperty(xdisplay, GetAcceleratedWidget(),
                    XInternAtom(xdisplay, "_GTK_THEME_VARIANT", False),
                    XInternAtom(xdisplay, "UTF8_STRING", False),
                    8, PropModeReplace,
                    reinterpret_cast<const unsigned char*>("dark"),
                    4);
  }
  
  
  std::vector<::Atom> state_atom_list;
  bool skip_taskbar = false;
  if (options.Get(options::kSkipTaskbar, &skip_taskbar) && skip_taskbar) {
    state_atom_list.push_back(GetAtom("_NET_WM_STATE_SKIP_TASKBAR"));
  }
  
  if (fullscreen) {
    state_atom_list.push_back(GetAtom("_NET_WM_STATE_FULLSCREEN"));
  }
  if (parent) {
    SetParentWindow(parent);
    
    window_type = "dialog";