| 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/Xatom.h> | 7 #include <X11/Xatom.h> |
| 8 #include <X11/Xregion.h> | 8 #include <X11/Xregion.h> |
| 9 #include <X11/Xutil.h> | 9 #include <X11/Xutil.h> |
| 10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
| (...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 return gfx::ToEnclosingRect(rect_in_dip); | 2010 return gfx::ToEnclosingRect(rect_in_dip); |
| 2011 } | 2011 } |
| 2012 | 2012 |
| 2013 gfx::Rect DesktopWindowTreeHostX11::ToPixelRect( | 2013 gfx::Rect DesktopWindowTreeHostX11::ToPixelRect( |
| 2014 const gfx::Rect& rect_in_dip) const { | 2014 const gfx::Rect& rect_in_dip) const { |
| 2015 gfx::RectF rect_in_pixels = gfx::RectF(rect_in_dip); | 2015 gfx::RectF rect_in_pixels = gfx::RectF(rect_in_dip); |
| 2016 GetRootTransform().TransformRect(&rect_in_pixels); | 2016 GetRootTransform().TransformRect(&rect_in_pixels); |
| 2017 return gfx::ToEnclosingRect(rect_in_pixels); | 2017 return gfx::ToEnclosingRect(rect_in_pixels); |
| 2018 } | 2018 } |
| 2019 | 2019 |
| 2020 const XID DesktopWindowTreeHostX11::GetModalDialog() { | 2020 XID DesktopWindowTreeHostX11::GetModalDialog() { |
| 2021 return modal_dialog_xid_; | 2021 return modal_dialog_xid_; |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 void DesktopWindowTreeHostX11::DisableEventListening(XID dialog) { | 2024 void DesktopWindowTreeHostX11::DisableEventListening(XID dialog) { |
| 2025 DCHECK(dialog); | 2025 DCHECK(dialog); |
| 2026 DCHECK(!modal_dialog_xid_); | 2026 DCHECK(!modal_dialog_xid_); |
| 2027 modal_dialog_xid_ = dialog; | 2027 modal_dialog_xid_ = dialog; |
| 2028 // ScopedWindowTargeter is used to temporarily replace the event-targeter | 2028 // ScopedWindowTargeter is used to temporarily replace the event-targeter |
| 2029 // with NullEventTargeter to make |dialog| modal. | 2029 // with NullEventTargeter to make |dialog| modal. |
| 2030 targeter_for_modal_.reset(new aura::ScopedWindowTargeter(window(), | 2030 targeter_for_modal_.reset(new aura::ScopedWindowTargeter(window(), |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2054 if (linux_ui) { | 2054 if (linux_ui) { |
| 2055 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2055 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 2056 if (native_theme) | 2056 if (native_theme) |
| 2057 return native_theme; | 2057 return native_theme; |
| 2058 } | 2058 } |
| 2059 | 2059 |
| 2060 return ui::NativeThemeAura::instance(); | 2060 return ui::NativeThemeAura::instance(); |
| 2061 } | 2061 } |
| 2062 | 2062 |
| 2063 } // namespace views | 2063 } // namespace views |
| OLD | NEW |