summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/aura/aura.gyp7
-rw-r--r--ui/aura/test/test_window_delegate.h3
-rw-r--r--ui/aura/toplevel_window_container.cc2
-rw-r--r--ui/aura_shell/aura_shell.gyp3
-rw-r--r--ui/aura_shell/default_container_event_filter.h4
-rw-r--r--ui/aura_shell/shell.cc5
-rw-r--r--ui/aura_shell/toplevel_window_event_filter.cc (renamed from ui/aura/toplevel_window_event_filter.cc)49
-rw-r--r--ui/aura_shell/toplevel_window_event_filter.h (renamed from ui/aura/toplevel_window_event_filter.h)41
-rw-r--r--ui/aura_shell/toplevel_window_event_filter_unittest.cc (renamed from ui/aura/toplevel_window_event_filter_unittest.cc)48
9 files changed, 92 insertions, 70 deletions
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index 1149373..dc16a73 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -47,8 +47,6 @@
'screen_aura.h',
'toplevel_window_container.cc',
'toplevel_window_container.h',
- 'toplevel_window_event_filter.cc',
- 'toplevel_window_event_filter.h',
'window.cc',
'window.h',
'window_delegate.h',
@@ -76,6 +74,8 @@
'test/event_generator.h',
'test/test_desktop_delegate.cc',
'test/test_desktop_delegate.h',
+ 'test/test_window_delegate.cc',
+ 'test/test_window_delegate.h',
],
},
{
@@ -127,10 +127,7 @@
'test/run_all_unittests.cc',
'test/test_suite.cc',
'test/test_suite.h',
- 'test/test_window_delegate.cc',
- 'test/test_window_delegate.h',
'event_filter_unittest.cc',
- 'toplevel_window_event_filter_unittest.cc',
'window_unittest.cc',
'<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.rc',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc',
diff --git a/ui/aura/test/test_window_delegate.h b/ui/aura/test/test_window_delegate.h
index 4150f67..9fcb170 100644
--- a/ui/aura/test/test_window_delegate.h
+++ b/ui/aura/test/test_window_delegate.h
@@ -7,13 +7,14 @@
#pragma once
#include "base/compiler_specific.h"
+#include "ui/aura/aura_export.h"
#include "ui/aura/window_delegate.h"
namespace aura {
namespace test {
// WindowDelegate implementation with all methods stubbed out.
-class TestWindowDelegate : public WindowDelegate {
+class AURA_EXPORT TestWindowDelegate : public WindowDelegate {
public:
TestWindowDelegate();
virtual ~TestWindowDelegate();
diff --git a/ui/aura/toplevel_window_container.cc b/ui/aura/toplevel_window_container.cc
index a621edf..9605d88 100644
--- a/ui/aura/toplevel_window_container.cc
+++ b/ui/aura/toplevel_window_container.cc
@@ -5,14 +5,12 @@
#include "ui/aura/toplevel_window_container.h"
#include "base/utf_string_conversions.h"
-#include "ui/aura/toplevel_window_event_filter.h"
namespace aura {
ToplevelWindowContainer::ToplevelWindowContainer()
: Window(NULL) {
set_name("ToplevelWindowContainer");
- SetEventFilter(new ToplevelWindowEventFilter(this));
}
ToplevelWindowContainer::~ToplevelWindowContainer() {
diff --git a/ui/aura_shell/aura_shell.gyp b/ui/aura_shell/aura_shell.gyp
index 395f2d9..716b2f4 100644
--- a/ui/aura_shell/aura_shell.gyp
+++ b/ui/aura_shell/aura_shell.gyp
@@ -76,6 +76,8 @@
'toplevel_layout_manager.h',
'window_frame.cc',
'window_frame.h',
+ 'toplevel_window_event_filter.cc',
+ 'toplevel_window_event_filter.h',
'workspace/workspace.cc',
'workspace/workspace.h',
'workspace/workspace_controller.cc',
@@ -114,6 +116,7 @@
'launcher/view_model_unittest.cc',
'launcher/view_model_utils_unittest.cc',
'toplevel_layout_manager_unittest.cc',
+ 'toplevel_window_event_filter_unittest.cc',
'workspace/workspace_manager_unittest.cc',
'run_all_unittests.cc',
'test_suite.cc',
diff --git a/ui/aura_shell/default_container_event_filter.h b/ui/aura_shell/default_container_event_filter.h
index 17199bc..f83e2b0 100644
--- a/ui/aura_shell/default_container_event_filter.h
+++ b/ui/aura_shell/default_container_event_filter.h
@@ -6,7 +6,7 @@
#define UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_
#pragma once
-#include "ui/aura/toplevel_window_event_filter.h"
+#include "ui/aura_shell/toplevel_window_event_filter.h"
namespace aura {
class MouseEvent;
@@ -16,7 +16,7 @@ class Window;
namespace aura_shell {
namespace internal {
-class DefaultContainerEventFilter : public aura::ToplevelWindowEventFilter {
+class DefaultContainerEventFilter : public ToplevelWindowEventFilter {
public:
explicit DefaultContainerEventFilter(aura::Window* owner);
virtual ~DefaultContainerEventFilter();
diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc
index b2a3a98..63270b7 100644
--- a/ui/aura_shell/shell.cc
+++ b/ui/aura_shell/shell.cc
@@ -20,6 +20,7 @@
#include "ui/aura_shell/shell_factory.h"
#include "ui/aura_shell/shell_window_ids.h"
#include "ui/aura_shell/toplevel_layout_manager.h"
+#include "ui/aura_shell/toplevel_window_event_filter.h"
#include "ui/aura_shell/workspace/workspace_controller.h"
#include "ui/gfx/compositor/layer.h"
#include "ui/gfx/compositor/layer_animator.h"
@@ -42,10 +43,14 @@ void CreateSpecialContainers(aura::Window::Windows* containers) {
containers->push_back(background_container);
aura::Window* default_container = new aura::ToplevelWindowContainer;
+ default_container->SetEventFilter(
+ new ToplevelWindowEventFilter(default_container));
default_container->set_id(internal::kShellWindowId_DefaultContainer);
containers->push_back(default_container);
aura::Window* always_on_top_container = new aura::ToplevelWindowContainer;
+ always_on_top_container->SetEventFilter(
+ new ToplevelWindowEventFilter(always_on_top_container));
always_on_top_container->set_id(
internal::kShellWindowId_AlwaysOnTopContainer);
containers->push_back(always_on_top_container);
diff --git a/ui/aura/toplevel_window_event_filter.cc b/ui/aura_shell/toplevel_window_event_filter.cc
index 165d35d..d24921f 100644
--- a/ui/aura/toplevel_window_event_filter.cc
+++ b/ui/aura_shell/toplevel_window_event_filter.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/aura/toplevel_window_event_filter.h"
+#include "ui/aura_shell/toplevel_window_event_filter.h"
#include "ui/aura/aura_constants.h"
#include "ui/aura/cursor.h"
@@ -13,7 +13,7 @@
#include "ui/aura/window_delegate.h"
#include "ui/base/ui_base_types.h"
-namespace aura {
+namespace aura_shell {
namespace {
@@ -116,7 +116,7 @@ int GetYMultiplierForWindowComponent(int window_component) {
}
-ToplevelWindowEventFilter::ToplevelWindowEventFilter(Window* owner)
+ToplevelWindowEventFilter::ToplevelWindowEventFilter(aura::Window* owner)
: EventFilter(owner),
window_component_(HTNOWHERE) {
}
@@ -124,13 +124,13 @@ ToplevelWindowEventFilter::ToplevelWindowEventFilter(Window* owner)
ToplevelWindowEventFilter::~ToplevelWindowEventFilter() {
}
-bool ToplevelWindowEventFilter::PreHandleKeyEvent(Window* target,
- KeyEvent* event) {
+bool ToplevelWindowEventFilter::PreHandleKeyEvent(aura::Window* target,
+ aura::KeyEvent* event) {
return false;
}
-bool ToplevelWindowEventFilter::PreHandleMouseEvent(Window* target,
- MouseEvent* event) {
+bool ToplevelWindowEventFilter::PreHandleMouseEvent(aura::Window* target,
+ aura::MouseEvent* event) {
// Process EventFilters implementation first so that it processes
// activation/focus first.
switch (event->type()) {
@@ -145,8 +145,8 @@ bool ToplevelWindowEventFilter::PreHandleMouseEvent(Window* target,
mouse_down_bounds_ = target->bounds();
mouse_down_offset_in_target_ = event->location();
mouse_down_offset_in_parent_ = mouse_down_offset_in_target_;
- Window::ConvertPointToWindow(target, target->parent(),
- &mouse_down_offset_in_parent_);
+ aura::Window::ConvertPointToWindow(target, target->parent(),
+ &mouse_down_offset_in_parent_);
return GetBoundsChangeForWindowComponent(window_component_) !=
kBoundsChange_None;
case ui::ET_MOUSE_DRAGGED:
@@ -161,17 +161,17 @@ bool ToplevelWindowEventFilter::PreHandleMouseEvent(Window* target,
}
ui::TouchStatus ToplevelWindowEventFilter::PreHandleTouchEvent(
- Window* target,
- TouchEvent* event) {
+ aura::Window* target,
+ aura::TouchEvent* event) {
// Process EventFilters implementation first so that it processes
// activation/focus first.
// TODO(sad): Allow moving/resizing/maximizing etc. from touch?
return ui::TOUCH_STATUS_UNKNOWN;
}
-void ToplevelWindowEventFilter::MoveWindowToFront(Window* target) {
- Window* parent = target->parent();
- Window* child = target;
+void ToplevelWindowEventFilter::MoveWindowToFront(aura::Window* target) {
+ aura::Window* parent = target->parent();
+ aura::Window* child = target;
while (parent) {
parent->MoveChildToFront(child);
if (parent == owner())
@@ -181,7 +181,8 @@ void ToplevelWindowEventFilter::MoveWindowToFront(Window* target) {
}
}
-bool ToplevelWindowEventFilter::HandleDrag(Window* target, MouseEvent* event) {
+bool ToplevelWindowEventFilter::HandleDrag(aura::Window* target,
+ aura::MouseEvent* event) {
int bounds_change = GetBoundsChangeForWindowComponent(window_component_);
if (bounds_change == kBoundsChange_None)
return false;
@@ -197,15 +198,16 @@ bool ToplevelWindowEventFilter::HandleDrag(Window* target, MouseEvent* event) {
}
void ToplevelWindowEventFilter::UpdateWindowComponentForEvent(
- Window* target, MouseEvent* event) {
+ aura::Window* target,
+ aura::MouseEvent* event) {
window_component_ =
target->delegate()->GetNonClientComponent(event->location());
}
gfx::Point ToplevelWindowEventFilter::GetOriginForDrag(
int bounds_change,
- Window* target,
- MouseEvent* event) const {
+ aura::Window* target,
+ aura::MouseEvent* event) const {
gfx::Point origin = mouse_down_bounds_.origin();
if (bounds_change & kBoundsChange_Repositions) {
int pos_change_direction =
@@ -225,17 +227,18 @@ gfx::Point ToplevelWindowEventFilter::GetOriginForDrag(
return origin;
}
-gfx::Size ToplevelWindowEventFilter::GetSizeForDrag(int bounds_change,
- Window* target,
- MouseEvent* event) const {
+gfx::Size ToplevelWindowEventFilter::GetSizeForDrag(
+ int bounds_change,
+ aura::Window* target,
+ aura::MouseEvent* event) const {
gfx::Size size = mouse_down_bounds_.size();
if (bounds_change & kBoundsChange_Resizes) {
int size_change_direction =
GetSizeChangeDirectionForWindowComponent(window_component_);
gfx::Point event_location_in_parent(event->location());
- Window::ConvertPointToWindow(target, target->parent(),
- &event_location_in_parent);
+ aura::Window::ConvertPointToWindow(target, target->parent(),
+ &event_location_in_parent);
// The math changes depending on whether the window is being resized, or
// repositioned in addition to being resized.
diff --git a/ui/aura/toplevel_window_event_filter.h b/ui/aura_shell/toplevel_window_event_filter.h
index ff19a17..e114586 100644
--- a/ui/aura/toplevel_window_event_filter.h
+++ b/ui/aura_shell/toplevel_window_event_filter.h
@@ -2,31 +2,35 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_AURA_TOPLEVEL_WINDOW_EVENT_FILTER_H_
-#define UI_AURA_TOPLEVEL_WINDOW_EVENT_FILTER_H_
+#ifndef UI_AURA_SHELL_TOPLEVEL_WINDOW_EVENT_FILTER_H_
+#define UI_AURA_SHELL_TOPLEVEL_WINDOW_EVENT_FILTER_H_
#pragma once
#include "base/compiler_specific.h"
-#include "ui/aura/aura_export.h"
#include "ui/aura/event_filter.h"
+#include "ui/aura_shell/aura_shell_export.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
namespace aura {
-
class Window;
class MouseEvent;
+}
+
+namespace aura_shell {
-class AURA_EXPORT ToplevelWindowEventFilter : public EventFilter {
+class AURA_SHELL_EXPORT ToplevelWindowEventFilter : public aura::EventFilter {
public:
- explicit ToplevelWindowEventFilter(Window* owner);
+ explicit ToplevelWindowEventFilter(aura::Window* owner);
virtual ~ToplevelWindowEventFilter();
// Overridden from EventFilter:
- virtual bool PreHandleKeyEvent(Window* target, KeyEvent* event) OVERRIDE;
- virtual bool PreHandleMouseEvent(Window* target, MouseEvent* event) OVERRIDE;
- virtual ui::TouchStatus PreHandleTouchEvent(Window* target,
- TouchEvent* event) OVERRIDE;
+ virtual bool PreHandleKeyEvent(aura::Window* target,
+ aura::KeyEvent* event) OVERRIDE;
+ virtual bool PreHandleMouseEvent(aura::Window* target,
+ aura::MouseEvent* event) OVERRIDE;
+ virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target,
+ aura::TouchEvent* event) OVERRIDE;
protected:
// Returns the |window_component_|. See the variable definition below for
@@ -37,24 +41,25 @@ class AURA_EXPORT ToplevelWindowEventFilter : public EventFilter {
// Moves the target window and all of its parents to the front of their
// respective z-orders.
// NOTE: this does NOT activate the window.
- void MoveWindowToFront(Window* target);
+ void MoveWindowToFront(aura::Window* target);
// Called during a drag to resize/position the window.
// The return value is returned by OnMouseEvent() above.
- bool HandleDrag(Window* target, MouseEvent* event);
+ bool HandleDrag(aura::Window* target, aura::MouseEvent* event);
// Updates the |window_component_| using the |event|'s location.
- void UpdateWindowComponentForEvent(Window* window, MouseEvent* event);
+ void UpdateWindowComponentForEvent(aura::Window* window,
+ aura::MouseEvent* event);
// Calculates the new origin of the window during a drag.
gfx::Point GetOriginForDrag(int bounds_change,
- Window* target,
- MouseEvent* event) const;
+ aura::Window* target,
+ aura::MouseEvent* event) const;
// Calculates the new size of the window during a drag.
gfx::Size GetSizeForDrag(int bounds_change,
- Window* target,
- MouseEvent* event) const;
+ aura::Window* target,
+ aura::MouseEvent* event) const;
// The mouse position in the target window when the mouse was pressed, in
// target window coordinates.
@@ -75,4 +80,4 @@ class AURA_EXPORT ToplevelWindowEventFilter : public EventFilter {
} // namespace aura
-#endif // UI_AURA_TOPLEVEL_WINDOW_EVENT_FILTER_H_
+#endif // UI_AURA_SHELL_TOPLEVEL_WINDOW_EVENT_FILTER_H_
diff --git a/ui/aura/toplevel_window_event_filter_unittest.cc b/ui/aura_shell/toplevel_window_event_filter_unittest.cc
index ad8050f..9c1ba06 100644
--- a/ui/aura/toplevel_window_event_filter_unittest.cc
+++ b/ui/aura_shell/toplevel_window_event_filter_unittest.cc
@@ -12,6 +12,7 @@
#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_desktop_delegate.h"
#include "ui/aura/test/test_window_delegate.h"
+#include "ui/aura_shell/toplevel_window_event_filter.h"
#include "ui/gfx/screen.h"
#if defined(OS_WIN)
@@ -22,14 +23,14 @@
#endif
-namespace aura {
+namespace aura_shell {
namespace test {
namespace {
// A simple window delegate that returns the specified hit-test code when
// requested.
-class HitTestWindowDelegate : public TestWindowDelegate {
+class HitTestWindowDelegate : public aura::test::TestWindowDelegate {
public:
explicit HitTestWindowDelegate(int hittest_code)
: hittest_code_(hittest_code) {
@@ -50,15 +51,24 @@ class HitTestWindowDelegate : public TestWindowDelegate {
DISALLOW_COPY_AND_ASSIGN(HitTestWindowDelegate);
};
-class ToplevelWindowEventFilterTest : public AuraTestBase {
+class ToplevelWindowEventFilterTest : public aura::test::AuraTestBase {
public:
ToplevelWindowEventFilterTest() {}
virtual ~ToplevelWindowEventFilterTest() {}
+ virtual void SetUp() OVERRIDE {
+ aura::test::AuraTestBase::SetUp();
+ aura::Window* default_container =
+ static_cast<aura::test::TestDesktopDelegate*>(
+ aura::Desktop::GetInstance()->delegate())->default_container();
+ default_container->SetEventFilter(
+ new ToplevelWindowEventFilter(default_container));
+ }
+
protected:
- Window* CreateWindow(int hittest_code) {
+ aura::Window* CreateWindow(int hittest_code) {
HitTestWindowDelegate* d1 = new HitTestWindowDelegate(hittest_code);
- Window* w1 = new Window(d1);
+ aura::Window* w1 = new aura::Window(d1);
w1->set_id(1);
w1->Init(ui::Layer::LAYER_HAS_TEXTURE);
w1->SetParent(NULL);
@@ -67,8 +77,8 @@ class ToplevelWindowEventFilterTest : public AuraTestBase {
return w1;
}
- void DragFromCenterBy(Window* window, int dx, int dy) {
- EventGenerator generator(window);
+ void DragFromCenterBy(aura::Window* window, int dx, int dy) {
+ aura::test::EventGenerator generator(window);
generator.DragMouseBy(dx, dy);
}
@@ -79,7 +89,7 @@ class ToplevelWindowEventFilterTest : public AuraTestBase {
}
TEST_F(ToplevelWindowEventFilterTest, Caption) {
- scoped_ptr<Window> w1(CreateWindow(HTCAPTION));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTCAPTION));
gfx::Size size = w1->bounds().size();
DragFromCenterBy(w1.get(), 100, 100);
// Position should have been offset by 100,100.
@@ -89,7 +99,7 @@ TEST_F(ToplevelWindowEventFilterTest, Caption) {
}
TEST_F(ToplevelWindowEventFilterTest, BottomRight) {
- scoped_ptr<Window> w1(CreateWindow(HTBOTTOMRIGHT));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTBOTTOMRIGHT));
gfx::Point position = w1->bounds().origin();
DragFromCenterBy(w1.get(), 100, 100);
// Position should not have changed.
@@ -99,10 +109,10 @@ TEST_F(ToplevelWindowEventFilterTest, BottomRight) {
}
TEST_F(ToplevelWindowEventFilterTest, GrowBox) {
- scoped_ptr<Window> w1(CreateWindow(HTGROWBOX));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTGROWBOX));
gfx::Point position = w1->bounds().origin();
w1->set_minimum_size(gfx::Size(50, 50));
- EventGenerator generator;
+ aura::test::EventGenerator generator;
generator.MoveMouseToCenterOf(w1.get());
generator.DragMouseBy(100, 100);
// Position should not have changed.
@@ -124,7 +134,7 @@ TEST_F(ToplevelWindowEventFilterTest, GrowBox) {
}
TEST_F(ToplevelWindowEventFilterTest, Right) {
- scoped_ptr<Window> w1(CreateWindow(HTRIGHT));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTRIGHT));
gfx::Point position = w1->bounds().origin();
DragFromCenterBy(w1.get(), 100, 100);
// Position should not have changed.
@@ -134,7 +144,7 @@ TEST_F(ToplevelWindowEventFilterTest, Right) {
}
TEST_F(ToplevelWindowEventFilterTest, Bottom) {
- scoped_ptr<Window> w1(CreateWindow(HTBOTTOM));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTBOTTOM));
gfx::Point position = w1->bounds().origin();
DragFromCenterBy(w1.get(), 100, 100);
// Position should not have changed.
@@ -144,7 +154,7 @@ TEST_F(ToplevelWindowEventFilterTest, Bottom) {
}
TEST_F(ToplevelWindowEventFilterTest, TopRight) {
- scoped_ptr<Window> w1(CreateWindow(HTTOPRIGHT));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTTOPRIGHT));
DragFromCenterBy(w1.get(), -50, 50);
// Position should have been offset by 0,50.
EXPECT_EQ(gfx::Point(0, 50), w1->bounds().origin());
@@ -153,7 +163,7 @@ TEST_F(ToplevelWindowEventFilterTest, TopRight) {
}
TEST_F(ToplevelWindowEventFilterTest, Top) {
- scoped_ptr<Window> w1(CreateWindow(HTTOP));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTTOP));
DragFromCenterBy(w1.get(), 50, 50);
// Position should have been offset by 0,50.
EXPECT_EQ(gfx::Point(0, 50), w1->bounds().origin());
@@ -162,7 +172,7 @@ TEST_F(ToplevelWindowEventFilterTest, Top) {
}
TEST_F(ToplevelWindowEventFilterTest, Left) {
- scoped_ptr<Window> w1(CreateWindow(HTLEFT));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTLEFT));
DragFromCenterBy(w1.get(), 50, 50);
// Position should have been offset by 50,0.
EXPECT_EQ(gfx::Point(50, 0), w1->bounds().origin());
@@ -171,7 +181,7 @@ TEST_F(ToplevelWindowEventFilterTest, Left) {
}
TEST_F(ToplevelWindowEventFilterTest, BottomLeft) {
- scoped_ptr<Window> w1(CreateWindow(HTBOTTOMLEFT));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTBOTTOMLEFT));
DragFromCenterBy(w1.get(), 50, -50);
// Position should have been offset by 50,0.
EXPECT_EQ(gfx::Point(50, 0), w1->bounds().origin());
@@ -180,7 +190,7 @@ TEST_F(ToplevelWindowEventFilterTest, BottomLeft) {
}
TEST_F(ToplevelWindowEventFilterTest, TopLeft) {
- scoped_ptr<Window> w1(CreateWindow(HTTOPLEFT));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTTOPLEFT));
DragFromCenterBy(w1.get(), 50, 50);
// Position should have been offset by 50,50.
EXPECT_EQ(gfx::Point(50, 50), w1->bounds().origin());
@@ -189,7 +199,7 @@ TEST_F(ToplevelWindowEventFilterTest, TopLeft) {
}
TEST_F(ToplevelWindowEventFilterTest, Client) {
- scoped_ptr<Window> w1(CreateWindow(HTCLIENT));
+ scoped_ptr<aura::Window> w1(CreateWindow(HTCLIENT));
gfx::Rect bounds = w1->bounds();
DragFromCenterBy(w1.get(), 100, 100);
// Neither position nor size should have changed.