| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/aura/window_tree_host_x11.h" | 5 #include "ui/aura/window_tree_host_x11.h" |
| 6 | 6 |
| 7 #include <strings.h> | 7 #include <strings.h> |
| 8 #include <X11/cursorfont.h> | 8 #include <X11/cursorfont.h> |
| 9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
| 10 #include <X11/extensions/Xrandr.h> | 10 #include <X11/extensions/Xrandr.h> |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 if (xev->type == EnterNotify) { | 245 if (xev->type == EnterNotify) { |
| 246 aura::Window* root_window = window(); | 246 aura::Window* root_window = window(); |
| 247 client::CursorClient* cursor_client = | 247 client::CursorClient* cursor_client = |
| 248 client::GetCursorClient(root_window); | 248 client::GetCursorClient(root_window); |
| 249 if (cursor_client) { | 249 if (cursor_client) { |
| 250 const display::Display display = | 250 const display::Display display = |
| 251 display::Screen::GetScreen()->GetDisplayNearestWindow( | 251 display::Screen::GetScreen()->GetDisplayNearestWindow( |
| 252 root_window); | 252 root_window); |
| 253 cursor_client->SetDisplay(display); | 253 cursor_client->SetDisplay(display); |
| 254 } | 254 } |
| 255 // EnterNotify creates ET_MOUSE_MOVE. Mark as synthesized as this is | |
| 256 // not a real mouse move event. | |
| 257 mouse_event.set_flags(mouse_event.flags() | ui::EF_IS_SYNTHESIZED); | |
| 258 } | 255 } |
| 259 | 256 |
| 260 TranslateAndDispatchLocatedEvent(&mouse_event); | 257 TranslateAndDispatchLocatedEvent(&mouse_event); |
| 261 break; | 258 break; |
| 262 } | 259 } |
| 263 case ui::ET_MOUSEWHEEL: { | 260 case ui::ET_MOUSEWHEEL: { |
| 264 ui::MouseWheelEvent mouseev(xev); | 261 ui::MouseWheelEvent mouseev(xev); |
| 265 TranslateAndDispatchLocatedEvent(&mouseev); | 262 TranslateAndDispatchLocatedEvent(&mouseev); |
| 266 break; | 263 break; |
| 267 } | 264 } |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 ui::LocatedEvent* event) { | 550 ui::LocatedEvent* event) { |
| 554 SendEventToSink(event); | 551 SendEventToSink(event); |
| 555 } | 552 } |
| 556 | 553 |
| 557 // static | 554 // static |
| 558 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds_in_pixels) { | 555 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds_in_pixels) { |
| 559 return new WindowTreeHostX11(bounds_in_pixels); | 556 return new WindowTreeHostX11(bounds_in_pixels); |
| 560 } | 557 } |
| 561 | 558 |
| 562 } // namespace aura | 559 } // namespace aura |
| OLD | NEW |