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

Unified Diff: chrome/browser/ui/views/panels/panel_frame_view.cc

Issue 197283008: Fix panel dragging on Linux Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/panels/panel_frame_view.cc
diff --git a/chrome/browser/ui/views/panels/panel_frame_view.cc b/chrome/browser/ui/views/panels/panel_frame_view.cc
index 30667d950f2272176209b8675f5294e5c1772376..8bc56a8505a4eec2f9cad7f8c0d1942ff1a60c93 100644
--- a/chrome/browser/ui/views/panels/panel_frame_view.cc
+++ b/chrome/browser/ui/views/panels/panel_frame_view.cc
@@ -18,6 +18,7 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/path.h"
+#include "ui/gfx/screen.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/widget/widget.h"
@@ -578,10 +579,18 @@ bool PanelFrameView::OnMousePressed(const ui::MouseEvent& event) {
}
bool PanelFrameView::OnMouseDragged(const ui::MouseEvent& event) {
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ // Converting the mouse location to screen coordinates returns an incorrect
+ // location while the panel is moving. See crbug.com/353393 for more details.
+ // TODO(pkotwicz): Fix conversion to screen coordinates
+ gfx::Screen* screen = gfx::Screen::GetNativeScreen();
+ gfx::Point mouse_location = screen->GetCursorScreenPoint();
+#else
// |event.location| is in the view's coordinate system. Convert it to the
// screen coordinate system.
gfx::Point mouse_location = event.location();
views::View::ConvertPointToScreen(this, &mouse_location);
+#endif
if (panel_view_->OnTitlebarMouseDragged(mouse_location))
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698