Revert "OSXWindow: fix window size and position computations"

This reverts commit 3408753302.

Change-Id: Ide87d79791aa37095127f048929e1b7a925259ab
Reviewed-on: https://chromium-review.googlesource.com/322391
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2016-01-19 10:28:30 -05:00
parent 46e6c7a512
commit 67d810449c
2 changed files with 6 additions and 6 deletions

View File

@@ -116,14 +116,14 @@ int main(int argc, char *argv[])
if (window->getWidth() != width || window->getHeight() != height)
{
std::cout << "Discrepancy between set dimensions and retrieved dimensions" << std::endl;
std::cout << "Width: " << width << " vs. " << window->getWidth() << std::endl;
std::cout << "Height: " << height << " vs. " << window->getHeight() << std::endl;
std::cout << "Width: " << window->getWidth() << " vs. " << width << std::endl;
std::cout << "Height: " << window->getHeight() << " vs. " << height << std::endl;
}
if (window->getX() != x || window->getY() != y)
{
std::cout << "Discrepancy between set position and retrieved position" << std::endl;
std::cout << "X: " << x << " vs. " << window->getX() << std::endl;
std::cout << "Y: " << y << " vs. " << window->getY() << std::endl;
std::cout << "X: " << window->getX() << " vs. " << x << std::endl;
std::cout << "Y: " << window->getY() << " vs. " << y << std::endl;
}
}
}

View File

@@ -120,7 +120,7 @@ static float YCoordToFromCG(float y)
- (void) windowDidResize: (NSNotification*) notification
{
NSSize windowSize = [[mWindow->getNSWindow() contentView] frame].size;
NSSize windowSize = [mWindow->getNSWindow() frame].size;
Event event;
event.Type = Event::EVENT_RESIZED;
event.Size.Width = windowSize.width;
@@ -130,7 +130,7 @@ static float YCoordToFromCG(float y)
- (void) windowDidMove: (NSNotification*) notification
{
NSRect screenspace = [mWindow->getNSWindow() frame];
NSRect screenspace = [mWindow->getNSWindow() contentRectForFrameRect:[mWindow->getNSWindow() frame]];
Event event;
event.Type = Event::EVENT_MOVED;
event.Move.X = screenspace.origin.x;