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

Unified Diff: chrome/common/gtk_util.cc

Issue 141061: Revert to enumerating all X windows if the Window Manager doesn't support _NE... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/gtk_util.h ('k') | chrome/common/x11_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gtk_util.cc
===================================================================
--- chrome/common/gtk_util.cc (revision 18927)
+++ chrome/common/gtk_util.cc (working copy)
@@ -216,10 +216,15 @@
return gdk_screen_is_composited(screen) == TRUE;
}
-void EnumerateChildWindows(EnumerateWindowsDelegate* delegate) {
+void EnumerateTopLevelWindows(x11_util::EnumerateWindowsDelegate* delegate) {
GdkScreen* screen = gdk_screen_get_default();
GList* stack = gdk_screen_get_window_stack(screen);
- DCHECK(stack);
+ if (!stack) {
+ // Window Manager doesn't support _NET_CLIENT_LIST_STACKING, so fall back
+ // to old school enumeration of all X windows.
+ x11_util::EnumerateAllWindows(delegate);
+ return;
+ }
for (GList* iter = g_list_last(stack); iter; iter = iter->prev) {
GdkWindow* window = static_cast<GdkWindow*>(iter->data);
« no previous file with comments | « chrome/common/gtk_util.h ('k') | chrome/common/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698