OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |