diff options
Diffstat (limited to 'win8')
-rw-r--r-- | win8/metro_driver/chrome_app_view_ash.cc | 11 | ||||
-rw-r--r-- | win8/metro_driver/chrome_app_view_ash.h | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc index 9af58b7..2f615d3 100644 --- a/win8/metro_driver/chrome_app_view_ash.cc +++ b/win8/metro_driver/chrome_app_view_ash.cc @@ -530,7 +530,8 @@ ChromeAppViewAsh::ChromeAppViewAsh() ui_channel_(nullptr), core_window_hwnd_(NULL), metro_dpi_scale_(0), - win32_dpi_scale_(0) { + win32_dpi_scale_(0), + last_cursor_(NULL) { DVLOG(1) << __FUNCTION__; globals.previous_state = winapp::Activation::ApplicationExecutionState_NotRunning; @@ -815,7 +816,8 @@ void ChromeAppViewAsh::OnOpenURLOnDesktop(const base::FilePath& shortcut, } void ChromeAppViewAsh::OnSetCursor(HCURSOR cursor) { - ::SetCursor(HCURSOR(cursor)); + ::SetCursor(cursor); + last_cursor_ = cursor; } void ChromeAppViewAsh::OnDisplayFileOpenDialog( @@ -1082,6 +1084,11 @@ HRESULT ChromeAppViewAsh::OnPointerMoved(winui::Core::ICoreWindow* sender, return hr; if (pointer.IsMouse()) { + // If the mouse was moved towards the charms or the OS specific section, + // the cursor may change from what the browser last set. Restore it here. + if (::GetCursor() != last_cursor_) + SetCursor(last_cursor_); + GenerateMouseEventFromMoveIfNecessary(pointer); ui_channel_->Send(new MetroViewerHostMsg_MouseMoved( pointer.x(), diff --git a/win8/metro_driver/chrome_app_view_ash.h b/win8/metro_driver/chrome_app_view_ash.h index 102d010..ca0dad5 100644 --- a/win8/metro_driver/chrome_app_view_ash.h +++ b/win8/metro_driver/chrome_app_view_ash.h @@ -238,6 +238,9 @@ class ChromeAppViewAsh // The win32 dpi scale which is queried via GetDeviceCaps. Please refer to // ui/gfx/win/dpi.cc for more information. float win32_dpi_scale_; + + // The cursor set by the chroem browser process. + HCURSOR last_cursor_; }; #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ |