summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 15:01:19 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 15:01:19 +0000
commit9a7f317d31d4478fb129b1c422f7f2a2d326658d (patch)
treecd637b6fa43d791adb3d6a73a28f37fdf8b4f129
parentd665486437d81ef40160203e128b0d74e9bb7d6e (diff)
downloadchromium_src-9a7f317d31d4478fb129b1c422f7f2a2d326658d.zip
chromium_src-9a7f317d31d4478fb129b1c422f7f2a2d326658d.tar.gz
chromium_src-9a7f317d31d4478fb129b1c422f7f2a2d326658d.tar.bz2
Use GET_X/Y_PARAM instead of LO/HIWORD.
According to MSDN, this avoids signed/unsigned issues that can lead to problems on systems with multiple monitors. Credit goes to Yoav Zilberberg for catching this! R=pkasting BUG=none TEST=none Review URL: http://codereview.chromium.org/160372 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22054 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.cc2
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc
index 6213111..bd42e90c 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/views/tabs/dragged_tab_controller.cc
@@ -1111,7 +1111,7 @@ void DraggedTabController::EnsureDraggedView() {
gfx::Point DraggedTabController::GetCursorScreenPoint() const {
#if defined(OS_WIN)
DWORD pos = GetMessagePos();
- return gfx::Point(LOWORD(pos), HIWORD(pos));
+ return gfx::Point(GET_X_LPARAM(pos), GET_Y_LPARAM(pos));
#else
gint x, y;
gdk_display_get_pointer(gdk_display_get_default(), NULL, &x, &y, NULL);
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 09025b5..52f61a9 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -1281,7 +1281,7 @@ bool TabStrip::IsCursorInTabStripZone() {
#if defined(OS_WIN)
DWORD pos = GetMessagePos();
- gfx::Point cursor_point(LOWORD(pos), HIWORD(pos));
+ gfx::Point cursor_point(GET_X_LPARAM(pos), GET_Y_LPARAM(pos));
#elif defined(OS_LINUX)
// TODO: make sure this is right with multiple monitors.
GdkScreen* screen = gdk_screen_get_default();