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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 1003863005: Fix tab drag and drop with hi-dpi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tab drag and drop with hi-dpi. Created 5 years, 9 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: chrome/browser/ui/views/tabs/tab_drag_controller.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index 644201dcab6a63db751e5924929a63e085d458a4..9349e51b078045f3066dd648ff77b12553963072 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -29,6 +29,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extension_function_dispatcher.h"
+#include "ui/compositor/dip_util.h"
#include "ui/events/event_constants.h"
#include "ui/events/gestures/gesture_recognizer.h"
#include "ui/gfx/geometry/point_conversions.h"
@@ -1782,7 +1783,7 @@ gfx::Vector2d TabDragController::GetWindowOffset(
}
gfx::NativeWindow TabDragController::GetLocalProcessWindow(
- const gfx::Point& screen_point,
+ gfx::Point screen_point,
bool exclude_dragged_view) {
std::set<gfx::NativeWindow> exclude;
if (exclude_dragged_view) {
@@ -1805,8 +1806,14 @@ gfx::NativeWindow TabDragController::GetLocalProcessWindow(
exclude.insert((*it)->window()->GetNativeWindow());
}
#endif
+
+#if defined(OS_LINUX) && defined(USE_AURA)
+ gfx::NativeWindow dragged_window =
+ attached_tabstrip_->GetWidget()->GetNativeWindow();
+ screen_point = ui::ConvertPointToPixel(dragged_window->layer(), screen_point);
+#endif
sadrul 2015/03/20 17:40:24 This should actually happen in window_finder_x11.c
stapelberg 2015/03/20 21:48:06 Done. I really hope you won’t suggest _another_ lo
sadrul 2015/03/20 22:02:03 Heh no. The new patchset looks good. We need to m
+
return GetLocalProcessWindowAtPoint(host_desktop_type_,
screen_point,
exclude);
-
}

Powered by Google App Engine
This is Rietveld 408576698