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

Unified Diff: mojo/services/native_viewport/native_viewport_win.cc

Issue 347433003: Fix incorrect position of Native Viewport contents on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | « mojo/examples/window_manager/window_manager.cc ('k') | mojo/services/view_manager/window_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/native_viewport/native_viewport_win.cc
diff --git a/mojo/services/native_viewport/native_viewport_win.cc b/mojo/services/native_viewport/native_viewport_win.cc
index 84bfdc37f7cf1fccc56aa429baf484309cbe59cb..52ff6cb6f0a27b0cb367fbd0f326695a4e65e5f0 100644
--- a/mojo/services/native_viewport/native_viewport_win.cc
+++ b/mojo/services/native_viewport/native_viewport_win.cc
@@ -143,8 +143,11 @@ class NativeViewportWin : public gfx::WindowImpl,
void OnWindowPosChanged(WINDOWPOS* window_pos) {
if (!(window_pos->flags & SWP_NOSIZE) ||
!(window_pos->flags & SWP_NOMOVE)) {
- delegate_->OnBoundsChanged(gfx::Rect(window_pos->x, window_pos->y,
- window_pos->cx, window_pos->cy));
+ RECT cr;
+ GetClientRect(hwnd(), &cr);
+ delegate_->OnBoundsChanged(
+ gfx::Rect(window_pos->x, window_pos->y,
+ cr.right - cr.left, cr.bottom - cr.top));
}
}
« no previous file with comments | « mojo/examples/window_manager/window_manager.cc ('k') | mojo/services/view_manager/window_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698