summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/aura/desktop_host_win.cc18
-rw-r--r--ui/aura_shell/default_container_layout_manager_unittest.cc4
2 files changed, 16 insertions, 6 deletions
diff --git a/ui/aura/desktop_host_win.cc b/ui/aura/desktop_host_win.cc
index 068be1a..8928ef2 100644
--- a/ui/aura/desktop_host_win.cc
+++ b/ui/aura/desktop_host_win.cc
@@ -182,13 +182,27 @@ gfx::Size DesktopHostWin::GetSize() const {
}
void DesktopHostWin::SetSize(const gfx::Size& size) {
+ if (fullscreen_) {
+ saved_window_rect_.right = saved_window_rect_.left + size.width();
+ saved_window_rect_.bottom = saved_window_rect_.top + size.height();
+ return;
+ }
+ RECT window_rect;
+ window_rect.left = 0;
+ window_rect.top = 0;
+ window_rect.right = size.width();
+ window_rect.bottom = size.height();
+ AdjustWindowRectEx(&window_rect,
+ GetWindowLong(hwnd(), GWL_STYLE),
+ FALSE,
+ GetWindowLong(hwnd(), GWL_EXSTYLE));
SetWindowPos(
hwnd(),
NULL,
0,
0,
- size.width(),
- size.height(),
+ window_rect.right - window_rect.left,
+ window_rect.bottom - window_rect.top,
SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOREDRAW | SWP_NOREPOSITION);
}
diff --git a/ui/aura_shell/default_container_layout_manager_unittest.cc b/ui/aura_shell/default_container_layout_manager_unittest.cc
index 534a0d9..2e6837c 100644
--- a/ui/aura_shell/default_container_layout_manager_unittest.cc
+++ b/ui/aura_shell/default_container_layout_manager_unittest.cc
@@ -105,7 +105,6 @@ ui::WindowShowState GetShowState(aura::Window* window) {
} // namespace
-#if !defined(OS_WIN)
TEST_F(DefaultContainerLayoutManagerTest, SetBounds) {
// Layout Manager moves the window to (0,0) to fit to draggable area.
scoped_ptr<aura::Window> child(
@@ -127,9 +126,7 @@ TEST_F(DefaultContainerLayoutManagerTest, SetBounds) {
child->SetBounds(gfx::Rect(0, -500, 900, 500));
EXPECT_EQ("0,0 500x400", child->bounds().ToString());
}
-#endif
-#if !defined(OS_WIN)
TEST_F(DefaultContainerLayoutManagerTest, DragWindow) {
scoped_ptr<aura::Window> child(
CreateTestWindow(gfx::Rect(0, -1000, 50, 50), container()));
@@ -145,7 +142,6 @@ TEST_F(DefaultContainerLayoutManagerTest, DragWindow) {
default_container_layout_manager()->EndMove(child.get(), NULL);
EXPECT_EQ(original_bounds.ToString(), child->GetTargetBounds().ToString());
}
-#endif
TEST_F(DefaultContainerLayoutManagerTest, Popup) {
scoped_ptr<aura::Window> popup(