From e046a2d51f9208e49422672e69f118f75640ec3a Mon Sep 17 00:00:00 2001 From: Karim Hamidou Date: Wed, 10 Feb 2016 18:11:50 -0800 Subject: [PATCH] added a postmsg handler. --- atom/browser/native_window_views_win.cc | 9 +++++++++ atom/browser/ui/win/atom_desktop_window_tree_host_win.cc | 5 +++++ atom/browser/ui/win/atom_desktop_window_tree_host_win.h | 3 +++ 3 files changed, 17 insertions(+) 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 -- 2.43.0