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

Unified Diff: ui/aura/ui_controls_x11.cc

Issue 11033038: Fix the issue of cursor's device scale factor when using monitors with differnt device scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a comment Created 8 years, 2 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
« no previous file with comments | « ui/aura/shared/compound_event_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/ui_controls_x11.cc
diff --git a/ui/aura/ui_controls_x11.cc b/ui/aura/ui_controls_x11.cc
index d1afd171617f3daba5d3010051932280db9074d6..47f37ee7dc879bf077678e84641cb47a3361ea65 100644
--- a/ui/aura/ui_controls_x11.cc
+++ b/ui/aura/ui_controls_x11.cc
@@ -15,6 +15,7 @@
#include "ui/aura/root_window.h"
#include "ui/aura/ui_controls_aura.h"
#include "ui/base/keycodes/keyboard_code_conversion_x.h"
+#include "ui/compositor/dip_util.h"
#include "ui/ui_controls/ui_controls_aura.h"
namespace aura {
@@ -136,8 +137,11 @@ class UIControlsX11 : public ui_controls::UIControlsAura {
XEvent xevent = {0};
XMotionEvent* xmotion = &xevent.xmotion;
xmotion->type = MotionNotify;
- g_current_x = xmotion->x = x;
- g_current_y = xmotion->y = y;
+ gfx::Point point = ui::ConvertPointToPixel(
+ root_window_->layer(),
+ gfx::Point(static_cast<int>(x), static_cast<int>(y)));
+ g_current_x = xmotion->x = point.x();
+ g_current_y = xmotion->y = point.y();
xmotion->state = button_down_mask;
xmotion->same_screen = True;
// RootWindow will take care of other necessary fields.
« no previous file with comments | « ui/aura/shared/compound_event_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698