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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 158 } |
159 | 159 |
160 // static | 160 // static |
161 DesktopWindowTreeHostX11* DesktopWindowTreeHostX11::GetHostForXID(XID xid) { | 161 DesktopWindowTreeHostX11* DesktopWindowTreeHostX11::GetHostForXID(XID xid) { |
162 aura::WindowTreeHost* host = | 162 aura::WindowTreeHost* host = |
163 aura::WindowTreeHost::GetForAcceleratedWidget(xid); | 163 aura::WindowTreeHost::GetForAcceleratedWidget(xid); |
164 return host ? host->window()->GetProperty(kHostForRootWindow) : NULL; | 164 return host ? host->window()->GetProperty(kHostForRootWindow) : NULL; |
165 } | 165 } |
166 | 166 |
167 // static | 167 // static |
| 168 bool DesktopWindowTreeHostX11::AnyHostHasCapture() { |
| 169 return (!!g_current_capture); |
| 170 } |
| 171 |
| 172 // static |
168 std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() { | 173 std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() { |
169 std::vector<aura::Window*> windows(open_windows().size()); | 174 std::vector<aura::Window*> windows(open_windows().size()); |
170 std::transform(open_windows().begin(), | 175 std::transform(open_windows().begin(), |
171 open_windows().end(), | 176 open_windows().end(), |
172 windows.begin(), | 177 windows.begin(), |
173 GetContentWindowForXID); | 178 GetContentWindowForXID); |
174 return windows; | 179 return windows; |
175 } | 180 } |
176 | 181 |
177 gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const { | 182 gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const { |
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 if (linux_ui) { | 1617 if (linux_ui) { |
1613 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 1618 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
1614 if (native_theme) | 1619 if (native_theme) |
1615 return native_theme; | 1620 return native_theme; |
1616 } | 1621 } |
1617 | 1622 |
1618 return ui::NativeTheme::instance(); | 1623 return ui::NativeTheme::instance(); |
1619 } | 1624 } |
1620 | 1625 |
1621 } // namespace views | 1626 } // namespace views |
OLD | NEW |