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

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

Issue 922843002: Fix software mirror mode on Ozone part 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/events/devices/device_data_manager.h" 8 #include "ui/events/devices/device_data_manager.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/ozone/evdev/event_factory_evdev.h" 10 #include "ui/events/ozone/evdev/event_factory_evdev.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 gfx::AcceleratedWidget grabber = window_manager_->event_grabber(); 119 gfx::AcceleratedWidget grabber = window_manager_->event_grabber();
120 if (grabber != gfx::kNullAcceleratedWidget) 120 if (grabber != gfx::kNullAcceleratedWidget)
121 return grabber == widget_; 121 return grabber == widget_;
122 122
123 if (event->IsTouchEvent()) { 123 if (event->IsTouchEvent()) {
124 // Dispatch the event if it is from the touchscreen associated with the 124 // Dispatch the event if it is from the touchscreen associated with the
125 // DriWindow. We cannot check the event's location because if the 125 // DriWindow. We cannot check the event's location because if the
126 // touchscreen has a bezel, touches in the bezel have a location outside of 126 // touchscreen has a bezel, touches in the bezel have a location outside of
127 // |bounds_|. 127 // |bounds_|.
128 int64_t display_id = 128 int64_t display_id =
129 DeviceDataManager::GetInstance()->GetDisplayForTouchDevice( 129 DeviceDataManager::GetInstance()->GetDestinationDisplayForTouchDevice(
130 event->source_device_id()); 130 event->source_device_id());
131 131
132 if (display_id == gfx::Display::kInvalidDisplayID) 132 if (display_id == gfx::Display::kInvalidDisplayID)
133 return false; 133 return false;
134 134
135 DisplaySnapshot* snapshot = display_manager_->GetDisplay(display_id); 135 DisplaySnapshot* snapshot = display_manager_->GetDisplay(display_id);
136 if (!snapshot || !snapshot->current_mode()) 136 if (!snapshot || !snapshot->current_mode())
137 return false; 137 return false;
138 138
139 gfx::Rect display_bounds(snapshot->origin(), 139 gfx::Rect display_bounds(snapshot->origin(),
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void DriWindow::OnChannelDestroyed() { 175 void DriWindow::OnChannelDestroyed() {
176 } 176 }
177 177
178 void DriWindow::SendBoundsChange() { 178 void DriWindow::SendBoundsChange() {
179 cursor_->PrepareForBoundsChange(widget_); 179 cursor_->PrepareForBoundsChange(widget_);
180 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_)); 180 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_));
181 cursor_->CommitBoundsChange(widget_, bounds_, GetCursorConfinedBounds()); 181 cursor_->CommitBoundsChange(widget_, bounds_, GetCursorConfinedBounds());
182 } 182 }
183 183
184 } // namespace ui 184 } // namespace ui
OLDNEW
« ui/events/devices/device_data_manager.cc ('K') | « ui/events/devices/device_data_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698