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

Side by Side Diff: ui/ozone/platform/dri/dri_window.cc

Issue 566953002: [Ozone-DRI] Fix cursor showing on wrong monitor after display changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/dri/dri_cursor.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/dri/dri_window.h" 5 #include "ui/ozone/platform/dri/dri_window.h"
6 6
7 #include "ui/events/event.h" 7 #include "ui/events/event.h"
8 #include "ui/events/ozone/evdev/event_factory_evdev.h" 8 #include "ui/events/ozone/evdev/event_factory_evdev.h"
9 #include "ui/events/platform/platform_event_source.h" 9 #include "ui/events/platform/platform_event_source.h"
10 #include "ui/ozone/platform/dri/dri_cursor.h" 10 #include "ui/ozone/platform/dri/dri_cursor.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 void DriWindow::Show() {} 47 void DriWindow::Show() {}
48 48
49 void DriWindow::Hide() {} 49 void DriWindow::Hide() {}
50 50
51 void DriWindow::Close() {} 51 void DriWindow::Close() {}
52 52
53 void DriWindow::SetBounds(const gfx::Rect& bounds) { 53 void DriWindow::SetBounds(const gfx::Rect& bounds) {
54 bounds_ = bounds; 54 bounds_ = bounds;
55 delegate_->OnBoundsChanged(bounds); 55 delegate_->OnBoundsChanged(bounds);
56 if (cursor_->GetCursorWindow() == widget_)
57 cursor_->HideCursor();
58
56 dri_window_delegate_->OnBoundsChanged(bounds); 59 dri_window_delegate_->OnBoundsChanged(bounds);
60
61 if (cursor_->GetCursorWindow() == widget_)
62 cursor_->ShowCursor();
57 } 63 }
58 64
59 gfx::Rect DriWindow::GetBounds() { 65 gfx::Rect DriWindow::GetBounds() {
60 return bounds_; 66 return bounds_;
61 } 67 }
62 68
63 void DriWindow::SetCapture() {} 69 void DriWindow::SetCapture() {}
64 70
65 void DriWindow::ReleaseCapture() {} 71 void DriWindow::ReleaseCapture() {}
66 72
(...skipping 22 matching lines...) Expand all
89 return true; 95 return true;
90 } 96 }
91 97
92 uint32_t DriWindow::DispatchEvent(const PlatformEvent& ne) { 98 uint32_t DriWindow::DispatchEvent(const PlatformEvent& ne) {
93 Event* event = static_cast<Event*>(ne); 99 Event* event = static_cast<Event*>(ne);
94 delegate_->DispatchEvent(event); 100 delegate_->DispatchEvent(event);
95 return POST_DISPATCH_STOP_PROPAGATION; 101 return POST_DISPATCH_STOP_PROPAGATION;
96 } 102 }
97 103
98 } // namespace ui 104 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_cursor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698