| Index: ui/ozone/platform/dri/dri_window.cc
|
| diff --git a/ui/ozone/platform/dri/dri_window.cc b/ui/ozone/platform/dri/dri_window.cc
|
| index 9796d137d9e7d749bd2e274de23f52feefefe7eb..83ea6d0b5796182b09b1a74a10571af751852a3f 100644
|
| --- a/ui/ozone/platform/dri/dri_window.cc
|
| +++ b/ui/ozone/platform/dri/dri_window.cc
|
| @@ -58,6 +58,11 @@ gfx::AcceleratedWidget DriWindow::GetAcceleratedWidget() {
|
| return widget_;
|
| }
|
|
|
| +gfx::Rect DriWindow::GetCursorConfinedBounds() const {
|
| + return cursor_confined_bounds_.IsEmpty() ? gfx::Rect(bounds_.size())
|
| + : cursor_confined_bounds_;
|
| +}
|
| +
|
| void DriWindow::Show() {}
|
|
|
| void DriWindow::Hide() {}
|
| @@ -98,6 +103,11 @@ void DriWindow::MoveCursorTo(const gfx::Point& location) {
|
| event_factory_->WarpCursorTo(widget_, location);
|
| }
|
|
|
| +void DriWindow::ConfineCursorToBounds(const gfx::Rect& bounds) {
|
| + cursor_confined_bounds_ = bounds;
|
| + cursor_->ConfineCursorToBounds(widget_, bounds);
|
| +}
|
| +
|
| bool DriWindow::CanDispatchEvent(const PlatformEvent& ne) {
|
| DCHECK(ne);
|
| Event* event = static_cast<Event*>(ne);
|
| @@ -156,6 +166,7 @@ uint32_t DriWindow::DispatchEvent(const PlatformEvent& native_event) {
|
| void DriWindow::OnChannelEstablished() {
|
| sender_->Send(new OzoneGpuMsg_CreateWindowDelegate(widget_));
|
| SendBoundsChange();
|
| + cursor_->ConfineCursorToBounds(widget_, GetCursorConfinedBounds());
|
| }
|
|
|
| void DriWindow::OnChannelDestroyed() {
|
| @@ -164,7 +175,6 @@ void DriWindow::OnChannelDestroyed() {
|
| void DriWindow::SendBoundsChange() {
|
| cursor_->PrepareForBoundsChange(widget_);
|
| sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_));
|
| - cursor_->CommitBoundsChange(widget_, bounds_);
|
| }
|
|
|
| } // namespace ui
|
|
|