From 86285c53789ce5ae40d2b63362325ba4fd590eef Mon Sep 17 00:00:00 2001 From: Shane Whitmire Date: Sat, 15 Jul 2023 08:57:06 -0500 Subject: [PATCH] Fix macOS resize bug There is a commit up for the macOS resize bug where we get rid of a previous fix entiry and just resize, but kimci86 stated that he found better behavior with this solution. I'm going to put up this for code review and we can compare it to https://github.com/SFML/SFML/pull/2538 and see which we like best --- src/SFML/Window/OSX/SFWindowController.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SFML/Window/OSX/SFWindowController.mm b/src/SFML/Window/OSX/SFWindowController.mm index 1da9634a5..f6cb3e99b 100644 --- a/src/SFML/Window/OSX/SFWindowController.mm +++ b/src/SFML/Window/OSX/SFWindowController.mm @@ -483,6 +483,11 @@ if (m_requester != 0) m_requester->windowResized(width, height - static_cast([self titlebarHeight])); } + else if (width != [self size].width || height != [self size].height + static_cast([self titlebarHeight])) + { + if (m_requester != 0) + m_requester->windowResized(width, height - static_cast([self titlebarHeight])); + } NSRect frame = NSMakeRect([m_window frame].origin.x, [m_window frame].origin.y,