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

Unified Diff: chrome/common/x11_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/x11_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/x11_util.cc
===================================================================
--- chrome/common/x11_util.cc (revision 18927)
+++ chrome/common/x11_util.cc (working copy)
@@ -161,6 +161,25 @@
return true;
}
+bool EnumerateAllWindows(EnumerateWindowsDelegate* delegate) {
+ XID root = GetX11RootWindow();
+ XID parent;
+ XID* children;
+ unsigned int num_children;
+ int status = XQueryTree(GetXDisplay(), root, &root, &parent,
+ &children, &num_children);
+ if (status == 0)
+ return false;
+
+ for (unsigned int i = 0; i < num_children; i++) {
+ if (delegate->ShouldStopIterating(children[i]))
+ break;
+ }
+
+ XFree(children);
+ return true;
+}
+
XRenderPictFormat* GetRenderVisualFormat(Display* dpy, Visual* visual) {
static XRenderPictFormat* pictformat = NULL;
if (pictformat)
« no previous file with comments | « chrome/common/x11_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698