Fix window state events on Windows

This commit fixes the issue we had with window state events not firing
when triggered through Aero Snap.
Instead of listening to command from the system menu (SC_MAXIMIZE etc.),
we use the WM_SIZE event.

This resolves #1381.
This commit is contained in:
Eran Tiktin 2015-09-29 02:20:09 +03:00
parent 7f1cb9f90a
commit ee0f0f6cfc
2 changed files with 73 additions and 34 deletions

View file

@ -142,6 +142,8 @@ class NativeWindowViews : public NativeWindow,
// MessageHandlerDelegate:
bool PreHandleMSG(
UINT message, WPARAM w_param, LPARAM l_param, LRESULT* result) override;
void HandleSizeEvent(WPARAM w_param, LPARAM l_param);
#endif
// NativeWindow:
@ -178,9 +180,9 @@ class NativeWindowViews : public NativeWindow,
#elif defined(OS_WIN)
// Weak ref.
AtomDesktopWindowTreeHostWin* atom_desktop_window_tree_host_win_;
// Records window was whether restored from minimized state or maximized
// state.
bool is_minimized_;
ui::WindowShowState last_window_state_;
// In charge of running taskbar related APIs.
TaskbarHost taskbar_host_;
#endif