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/platform_window/x11/x11_window.h" | 5 #include "ui/platform_window/x11/x11_window.h" |
6 | 6 |
7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 #include <X11/Xutil.h> | 10 #include <X11/Xutil.h> |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 void X11Window::Maximize() {} | 244 void X11Window::Maximize() {} |
245 | 245 |
246 void X11Window::Minimize() {} | 246 void X11Window::Minimize() {} |
247 | 247 |
248 void X11Window::Restore() {} | 248 void X11Window::Restore() {} |
249 | 249 |
250 void X11Window::SetCursor(PlatformCursor cursor) {} | 250 void X11Window::SetCursor(PlatformCursor cursor) {} |
251 | 251 |
252 void X11Window::MoveCursorTo(const gfx::Point& location) {} | 252 void X11Window::MoveCursorTo(const gfx::Point& location) {} |
253 | 253 |
| 254 void X11Window::ConfineCursorToBounds(const gfx::Rect& bounds) { |
| 255 } |
| 256 |
254 bool X11Window::CanDispatchEvent(const PlatformEvent& event) { | 257 bool X11Window::CanDispatchEvent(const PlatformEvent& event) { |
255 return FindXEventTarget(event) == xwindow_; | 258 return FindXEventTarget(event) == xwindow_; |
256 } | 259 } |
257 | 260 |
258 uint32_t X11Window::DispatchEvent(const PlatformEvent& event) { | 261 uint32_t X11Window::DispatchEvent(const PlatformEvent& event) { |
259 XEvent* xev = event; | 262 XEvent* xev = event; |
260 switch (xev->type) { | 263 switch (xev->type) { |
261 case EnterNotify: { | 264 case EnterNotify: { |
262 // EnterNotify creates ET_MOUSE_MOVED. Mark as synthesized as this is | 265 // EnterNotify creates ET_MOUSE_MOVED. Mark as synthesized as this is |
263 // not real mouse move event. | 266 // not real mouse move event. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 355 |
353 case GenericEvent: { | 356 case GenericEvent: { |
354 ProcessXInput2Event(xev); | 357 ProcessXInput2Event(xev); |
355 break; | 358 break; |
356 } | 359 } |
357 } | 360 } |
358 return POST_DISPATCH_STOP_PROPAGATION; | 361 return POST_DISPATCH_STOP_PROPAGATION; |
359 } | 362 } |
360 | 363 |
361 } // namespace ui | 364 } // namespace ui |
OLD | NEW |