Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(912)

Unified Diff: ui/display/win/screen_win.cc

Issue 1935083003: gfx::Screen: Replace GetWindowUnderCursor() with IsWindowUnderCursor(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile fixes Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/display/win/screen_win.cc
diff --git a/ui/display/win/screen_win.cc b/ui/display/win/screen_win.cc
index e79645d4d15f2a11ce9bc4d243123a38c5847bf4..0667369bd5d61d8cb716b3ffa7f3de590ceca88c 100644
--- a/ui/display/win/screen_win.cc
+++ b/ui/display/win/screen_win.cc
@@ -161,11 +161,11 @@ gfx::Point ScreenWin::GetCursorScreenPoint() {
return ScreenToDIPPoint(cursor_pos_pixels);
}
-gfx::NativeWindow ScreenWin::GetWindowUnderCursor() {
+bool ScreenWin::IsWindowUnderCursor(gfx::NativeWindow window) {
POINT cursor_loc;
HWND hwnd =
::GetCursorPos(&cursor_loc) ? ::WindowFromPoint(cursor_loc) : nullptr;
- return GetNativeWindowFromHWND(hwnd);
+ return GetNativeWindowFromHWND(hwnd) == window;
}
gfx::NativeWindow ScreenWin::GetWindowAtScreenPoint(const gfx::Point& point) {

Powered by Google App Engine
This is Rietveld 408576698