- Electron version: 1.4.1
- Operating system: Windows 7 and 10

If you drag the window to the top edge to maximize it, and then call `restore()` or `unmaximize()` the window will move to the top, where the maximization happened, usually slightly out of view. 
With the regular Windows restore button it moves back to place before the drag started.

I'd really like to use a frameless window with my own window controls, but this problem comes out pretty often.

atom/browser/native_window_views.h
views::NonClientFrameView* CreateNonClientFrameView(
      views::Widget* widget) override;
  void OnWidgetMove() override;
#if defined(OS_WIN)
  bool ExecuteWindowsCommand(int command_id) override;
#endif
#if defined(OS_WIN)
  
  bool PreHandleMSG(
      UINT message, WPARAM w_param, LPARAM l_param, LRESULT* result) override;
  void HandleSizeEvent(WPARAM w_param, LPARAM l_param);
#endif
  
  gfx::Rect ContentBoundsToWindowBounds(const gfx::Rect& bounds) override;
  gfx::Rect WindowBoundsToContentBounds(const gfx::Rect& bounds) override;
  void HandleKeyboardEvent(
      content::WebContents*,
      const content::NativeWebKeyboardEvent& event) override;
  
  gfx::Size GetMinimumSize() override;
  gfx::Size GetMaximumSize() override;
  bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
  
  void RegisterAccelerators(AtomMenuModel* menu_model);
  
  ui::WindowShowState GetRestoredState();
  std::unique_ptr<views::Widget> window_;
  views::View* web_view_;  
  std::unique_ptr<MenuBar> menu_bar_;
  bool menu_bar_autohide_;