summaryrefslogtreecommitdiffstats
path: root/chrome/common/x11_util.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-22 20:34:35 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-22 20:34:35 +0000
commit5a639de2090282a219922cc5799116919320cb18 (patch)
tree214ba732b21b34cda0b62bffec556d39dfb73ca6 /chrome/common/x11_util.cc
parent8d1523ab7ad36c8a4f5c9bffd110caeffcdc04be (diff)
downloadchromium_src-5a639de2090282a219922cc5799116919320cb18.zip
chromium_src-5a639de2090282a219922cc5799116919320cb18.tar.gz
chromium_src-5a639de2090282a219922cc5799116919320cb18.tar.bz2
Revert to enumerating all X windows if the Window Manager doesn't support _NET_CLIENT_LIST_STACKING.
BUG=14004 TEST=Drag tabs in and out of tabstrip in xmonad window manager. Review URL: http://codereview.chromium.org/141061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/x11_util.cc')
-rw-r--r--chrome/common/x11_util.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/common/x11_util.cc b/chrome/common/x11_util.cc
index 522921f..da3eb7d 100644
--- a/chrome/common/x11_util.cc
+++ b/chrome/common/x11_util.cc
@@ -161,6 +161,25 @@ bool GetWindowRect(XID window, gfx::Rect* rect) {
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)