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/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
6 | 6 |
7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
10 #include <X11/Xregion.h> | 10 #include <X11/Xregion.h> |
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1512 if (g_current_capture && g_current_capture != this && | 1512 if (g_current_capture && g_current_capture != this && |
1513 event->type() == ui::ET_TOUCH_PRESSED) { | 1513 event->type() == ui::ET_TOUCH_PRESSED) { |
1514 ConvertEventToDifferentHost(event, g_current_capture); | 1514 ConvertEventToDifferentHost(event, g_current_capture); |
1515 g_current_capture->SendEventToProcessor(event); | 1515 g_current_capture->SendEventToProcessor(event); |
1516 } else { | 1516 } else { |
1517 SendEventToProcessor(event); | 1517 SendEventToProcessor(event); |
1518 } | 1518 } |
1519 } | 1519 } |
1520 | 1520 |
1521 void DesktopWindowTreeHostX11::DispatchKeyEvent(ui::KeyEvent* event) { | 1521 void DesktopWindowTreeHostX11::DispatchKeyEvent(ui::KeyEvent* event) { |
1522 GetInputMethod()->DispatchKeyEvent(*event); | 1522 GetInputMethod()->DispatchKeyEvent(event); |
1523 event->StopPropagation(); | |
1524 } | 1523 } |
1525 | 1524 |
1526 void DesktopWindowTreeHostX11::ConvertEventToDifferentHost( | 1525 void DesktopWindowTreeHostX11::ConvertEventToDifferentHost( |
1527 ui::LocatedEvent* located_event, | 1526 ui::LocatedEvent* located_event, |
1528 DesktopWindowTreeHostX11* host) { | 1527 DesktopWindowTreeHostX11* host) { |
1529 DCHECK_NE(this, host); | 1528 DCHECK_NE(this, host); |
1530 const gfx::Display display_src = | 1529 const gfx::Display display_src = |
1531 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(window()); | 1530 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(window()); |
1532 const gfx::Display display_dest = | 1531 const gfx::Display display_dest = |
1533 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(host->window()); | 1532 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(host->window()); |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2056 if (linux_ui) { | 2055 if (linux_ui) { |
2057 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2056 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
2058 if (native_theme) | 2057 if (native_theme) |
2059 return native_theme; | 2058 return native_theme; |
2060 } | 2059 } |
2061 | 2060 |
2062 return ui::NativeTheme::instance(); | 2061 return ui::NativeTheme::instance(); |
2063 } | 2062 } |
2064 | 2063 |
2065 } // namespace views | 2064 } // namespace views |
OLD | NEW |