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

Unified Diff: x11/mock_x_connection.cc

Issue 6902072: wm: Update a lot of code to use structs from geometry.h. (Closed) Base URL: ssh://gitrw.chromium.org:9222/window_manager.git@master
Patch Set: move override-redirect stacking and visibility into Window Created 9 years, 8 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
« window.cc ('K') | « window_test.cc ('k') | x11/real_x_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: x11/mock_x_connection.cc
diff --git a/x11/mock_x_connection.cc b/x11/mock_x_connection.cc
index 8686b8e8613394b0804203c08919495203b70343..d7de256795d3936c005b0596cf4242c290655599 100644
--- a/x11/mock_x_connection.cc
+++ b/x11/mock_x_connection.cc
@@ -427,7 +427,8 @@ bool MockXConnection::GetWindowBoundingRegion(XWindow xid, ByteMap* bytemap) {
if (info->shape.get())
bytemap->Copy(*(info->shape.get()));
else
- bytemap->SetRectangle(0, 0, info->bounds.width, info->bounds.height, 0xff);
+ bytemap->SetRectangle(
+ Rect(0, 0, info->bounds.width, info->bounds.height), 0xff);
return true;
}
@@ -442,10 +443,9 @@ bool MockXConnection::SetWindowBoundingRegionToRect(XWindow xid,
info->shape.reset(NULL);
} else {
if (info->shape.get() == NULL)
- info->shape.reset(new ByteMap(info->bounds.width, info->bounds.height));
+ info->shape.reset(new ByteMap(info->bounds.size()));
info->shape->Clear(0);
- info->shape->SetRectangle(
- region.x, region.y, region.width, region.height, 0xff);
+ info->shape->SetRectangle(region, 0xff);
}
return true;
}
@@ -455,7 +455,7 @@ bool MockXConnection::RemoveWindowBoundingRegion(XWindow xid) {
if (!info)
return false;
if (info->shape.get() == NULL)
- info->shape.reset(new ByteMap(info->bounds.width, info->bounds.height));
+ info->shape.reset(new ByteMap(info->bounds.size()));
info->shape->Clear(0);
return true;
}
« window.cc ('K') | « window_test.cc ('k') | x11/real_x_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698