mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-06 02:09:55 +03:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user