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/ui/gtk/gtk_util.h" | 5 #include "chrome/browser/ui/gtk/gtk_util.h" |
6 | 6 |
7 #include <cairo/cairo.h> | 7 #include <cairo/cairo.h> |
8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 return centering_vbox; | 541 return centering_vbox; |
542 } | 542 } |
543 | 543 |
544 bool IsScreenComposited() { | 544 bool IsScreenComposited() { |
545 GdkScreen* screen = gdk_screen_get_default(); | 545 GdkScreen* screen = gdk_screen_get_default(); |
546 return gdk_screen_is_composited(screen) == TRUE; | 546 return gdk_screen_is_composited(screen) == TRUE; |
547 } | 547 } |
548 | 548 |
549 void EnumerateTopLevelWindows(ui::EnumerateWindowsDelegate* delegate) { | 549 void EnumerateTopLevelWindows(ui::EnumerateWindowsDelegate* delegate) { |
550 std::vector<XID> stack; | 550 std::vector<XID> stack; |
551 if (!ui::GetXWindowStack(&stack)) { | 551 if (!ui::GetXWindowStack(ui::GetX11RootWindow(), &stack)) { |
552 // Window Manager doesn't support _NET_CLIENT_LIST_STACKING, so fall back | 552 // Window Manager doesn't support _NET_CLIENT_LIST_STACKING, so fall back |
553 // to old school enumeration of all X windows. Some WMs parent 'top-level' | 553 // to old school enumeration of all X windows. Some WMs parent 'top-level' |
554 // windows in unnamed actual top-level windows (ion WM), so extend the | 554 // windows in unnamed actual top-level windows (ion WM), so extend the |
555 // search depth to all children of top-level windows. | 555 // search depth to all children of top-level windows. |
556 const int kMaxSearchDepth = 1; | 556 const int kMaxSearchDepth = 1; |
557 ui::EnumerateAllWindows(delegate, kMaxSearchDepth); | 557 ui::EnumerateAllWindows(delegate, kMaxSearchDepth); |
558 return; | 558 return; |
559 } | 559 } |
560 | 560 |
561 std::vector<XID>::iterator iter; | 561 std::vector<XID>::iterator iter; |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 | 1241 |
1242 void DoCopy(BrowserWindow* window) { | 1242 void DoCopy(BrowserWindow* window) { |
1243 DoCutCopyPaste(window, &RenderViewHost::Copy, "copy-clipboard"); | 1243 DoCutCopyPaste(window, &RenderViewHost::Copy, "copy-clipboard"); |
1244 } | 1244 } |
1245 | 1245 |
1246 void DoPaste(BrowserWindow* window) { | 1246 void DoPaste(BrowserWindow* window) { |
1247 DoCutCopyPaste(window, &RenderViewHost::Paste, "paste-clipboard"); | 1247 DoCutCopyPaste(window, &RenderViewHost::Paste, "paste-clipboard"); |
1248 } | 1248 } |
1249 | 1249 |
1250 } // namespace gtk_util | 1250 } // namespace gtk_util |
OLD | NEW |