diff options
Diffstat (limited to 'mojo/services/native_viewport/native_viewport_win.cc')
-rw-r--r-- | mojo/services/native_viewport/native_viewport_win.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mojo/services/native_viewport/native_viewport_win.cc b/mojo/services/native_viewport/native_viewport_win.cc index 7bda7ab..668a6ab 100644 --- a/mojo/services/native_viewport/native_viewport_win.cc +++ b/mojo/services/native_viewport/native_viewport_win.cc @@ -39,6 +39,16 @@ class NativeViewportWin : public gfx::WindowImpl, DestroyWindow(hwnd()); } + virtual void SetCapture() OVERRIDE { + DCHECK(::GetCapture() != hwnd()); + ::SetCapture(hwnd()); + } + + virtual void ReleaseCapture() OVERRIDE { + if (::GetCapture() == hwnd()) + ::ReleaseCapture(); + } + BEGIN_MSG_MAP_EX(NativeViewportWin) MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) |