| 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 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 TRACE_EVENT1("views", "DesktopWindowTreeHostX11::Dispatch", | 1523 TRACE_EVENT1("views", "DesktopWindowTreeHostX11::Dispatch", |
| 1524 "event->type", event->type); | 1524 "event->type", event->type); |
| 1525 | 1525 |
| 1526 UpdateWMUserTime(event); | 1526 UpdateWMUserTime(event); |
| 1527 | 1527 |
| 1528 // May want to factor CheckXEventForConsistency(xev); into a common location | 1528 // May want to factor CheckXEventForConsistency(xev); into a common location |
| 1529 // since it is called here. | 1529 // since it is called here. |
| 1530 switch (xev->type) { | 1530 switch (xev->type) { |
| 1531 case EnterNotify: | 1531 case EnterNotify: |
| 1532 case LeaveNotify: { | 1532 case LeaveNotify: { |
| 1533 // Ignore EventNotify and LeaveNotify events from children of |xwindow_|. |
| 1534 // NativeViewGLSurfaceGLX adds a child to |xwindow_|. |
| 1535 // TODO(pkotwicz|tdanderson): Figure out whether the suppression is |
| 1536 // necessary. crbug.com/385716 |
| 1537 if (xev->xcrossing.detail == NotifyInferior) |
| 1538 break; |
| 1539 |
| 1533 ui::MouseEvent mouse_event(xev); | 1540 ui::MouseEvent mouse_event(xev); |
| 1534 DispatchMouseEvent(&mouse_event); | 1541 DispatchMouseEvent(&mouse_event); |
| 1535 break; | 1542 break; |
| 1536 } | 1543 } |
| 1537 case Expose: { | 1544 case Expose: { |
| 1538 gfx::Rect damage_rect(xev->xexpose.x, xev->xexpose.y, | 1545 gfx::Rect damage_rect(xev->xexpose.x, xev->xexpose.y, |
| 1539 xev->xexpose.width, xev->xexpose.height); | 1546 xev->xexpose.width, xev->xexpose.height); |
| 1540 compositor()->ScheduleRedrawRect(damage_rect); | 1547 compositor()->ScheduleRedrawRect(damage_rect); |
| 1541 break; | 1548 break; |
| 1542 } | 1549 } |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1787 if (linux_ui) { | 1794 if (linux_ui) { |
| 1788 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 1795 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 1789 if (native_theme) | 1796 if (native_theme) |
| 1790 return native_theme; | 1797 return native_theme; |
| 1791 } | 1798 } |
| 1792 | 1799 |
| 1793 return ui::NativeTheme::instance(); | 1800 return ui::NativeTheme::instance(); |
| 1794 } | 1801 } |
| 1795 | 1802 |
| 1796 } // namespace views | 1803 } // namespace views |
| OLD | NEW |