Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/ui/gtk/gtk_util.cc

Issue 6359008: Do not show notifications when in fullscreen or screensaver mode.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/notifications/notification_ui_manager.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_ui_manager.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698