OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/fullscreen.h" | 5 #include "chrome/browser/fullscreen.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "chrome/browser/ui/gtk/gtk_util.h" | 14 #include "chrome/browser/ui/gtk/gtk_util.h" |
15 #include "gfx/rect.h" | |
16 #include "ui/base/x/x11_util.h" | 15 #include "ui/base/x/x11_util.h" |
| 16 #include "ui/gfx/rect.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // TODO (jianli): Merge with gtk_util::EnumerateTopLevelWindows. | 20 // TODO (jianli): Merge with gtk_util::EnumerateTopLevelWindows. |
21 void EnumerateAllChildWindows(ui::EnumerateWindowsDelegate* delegate, | 21 void EnumerateAllChildWindows(ui::EnumerateWindowsDelegate* delegate, |
22 XID window) { | 22 XID window) { |
23 std::vector<XID> windows; | 23 std::vector<XID> windows; |
24 | 24 |
25 if (!ui::GetXWindowStack(window, &windows)) { | 25 if (!ui::GetXWindowStack(window, &windows)) { |
26 // Window Manager doesn't support _NET_CLIENT_LIST_STACKING, so fall back | 26 // Window Manager doesn't support _NET_CLIENT_LIST_STACKING, so fall back |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 | 136 |
137 } | 137 } |
138 | 138 |
139 bool IsFullScreenMode() { | 139 bool IsFullScreenMode() { |
140 gdk_error_trap_push(); | 140 gdk_error_trap_push(); |
141 bool result = IsTopMostWindowFullScreen(); | 141 bool result = IsTopMostWindowFullScreen(); |
142 bool got_error = gdk_error_trap_pop(); | 142 bool got_error = gdk_error_trap_pop(); |
143 return result && !got_error; | 143 return result && !got_error; |
144 } | 144 } |
OLD | NEW |