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

Unified Diff: chrome/common/x11_util.cc

Issue 119345: Use the convenience function gdk_screen_get_window_stack to enumerate top-lev... (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 17916)
+++ chrome/common/x11_util.cc (working copy)
@@ -144,34 +144,20 @@
}
bool GetWindowRect(XID window, gfx::Rect* rect) {
- Window root_window;
+ Window root, child;
int x, y;
unsigned int width, height;
unsigned int border_width, depth;
- if (!XGetGeometry(GetXDisplay(), window, &root_window, &x, &y,
+ if (!XGetGeometry(GetXDisplay(), window, &root, &x, &y,
&width, &height, &border_width, &depth))
return false;
- *rect = gfx::Rect(x, y, width, height);
- return true;
-}
-
-bool EnumerateChildWindows(XID root, EnumerateWindowsDelegate* delegate) {
- XID parent;
- XID* children;
- unsigned int num_children;
- int status = XQueryTree(GetXDisplay(), root, &root, &parent,
- &children, &num_children);
- if (status == 0)
+ if (!XTranslateCoordinates(GetSecondaryDisplay(), window, root,
tony 2009/06/09 16:37:55 What is this for?
James Hawkins 2009/06/10 21:54:23 This translates the coordinates that are window-re
+ 0, 0, &x, &y, &child))
return false;
- for (unsigned int i = 0; i < num_children; i++) {
- if (delegate->ShouldStopIterating(children[i]))
- break;
- }
-
- XFree(children);
+ *rect = gfx::Rect(x, y, width, height);
return true;
}
« 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