From: Karim Hamidou Date: Thu, 11 Feb 2016 02:11:50 +0000 (-0800) Subject: added a postmsg handler. X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=e046a2d51f9208e49422672e69f118f75640ec3a;p=electron.git added a postmsg handler. --- diff --git a/atom/browser/native_window_views_win.cc b/atom/browser/native_window_views_win.cc index e5ed1975..09de12fc 100644 --- a/atom/browser/native_window_views_win.cc +++ b/atom/browser/native_window_views_win.cc @@ -106,6 +106,15 @@ bool NativeWindowViews::PreHandleMSG( } } +bool NativeWindowViews::PostHandleMSG( + UINT message, WPARAM w_param, LPARAM l_param, LRESULT* result) { + NotifyWindowMessage(message, w_param, l_param); + + switch (message) { + default: + return false; + } +} void NativeWindowViews::HandleSizeEvent(WPARAM w_param, LPARAM l_param) { // Here we handle the WM_SIZE event in order to figure out what is the current // window state and notify the user accordingly. diff --git a/atom/browser/ui/win/atom_desktop_window_tree_host_win.cc b/atom/browser/ui/win/atom_desktop_window_tree_host_win.cc index 84a6d9aa..cd5f8f46 100644 --- a/atom/browser/ui/win/atom_desktop_window_tree_host_win.cc +++ b/atom/browser/ui/win/atom_desktop_window_tree_host_win.cc @@ -25,4 +25,9 @@ bool AtomDesktopWindowTreeHostWin::PreHandleMSG( return delegate_->PreHandleMSG(message, w_param, l_param, result); } +bool PostHandleMSG( + UINT message, WPARAM w_param, LPARAM l_param, LRESULT* result) { + return delegate_->PostHandleMSG(message, w_param, l_param, result); +} + } // namespace atom diff --git a/atom/browser/ui/win/atom_desktop_window_tree_host_win.h b/atom/browser/ui/win/atom_desktop_window_tree_host_win.h index 47e4cb6a..bd7cf755 100644 --- a/atom/browser/ui/win/atom_desktop_window_tree_host_win.h +++ b/atom/browser/ui/win/atom_desktop_window_tree_host_win.h @@ -28,6 +28,9 @@ class AtomDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin { bool PreHandleMSG( UINT message, WPARAM w_param, LPARAM l_param, LRESULT* result) override; + bool PostHandleMSG( + UINT message, WPARAM w_param, LPARAM l_param, LRESULT* result) override; + private: MessageHandlerDelegate* delegate_; // weak ref