Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macOS Window Resizing Bug #2538

Merged
merged 1 commit into from Apr 30, 2023

Conversation

ChrisThrasher
Copy link
Member

@ChrisThrasher ChrisThrasher commented Apr 28, 2023

Description

Fixes bug where resize events only got triggered upon manual window resizing OR if one called sf::WindowBase::setSize with a height that was too large. This was caught during the testing of #2519. The reason we think it's a bug is that other windowing backends like X11 do emit a resize event when setSize is called.

Brief testing proves that this works but I'm not sure if this has any unintended side effects so I'm not eager to merge until I understand the code better. This bug is present on 2.6.x as well in case we choose to backport this.

Fixes bug where resize events only got triggered upon manual window
resizing OR if one called setSize with a height that was too large.
@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #2538 (d26625c) into master (cbfa9cb) will increase coverage by 0.03%.
The diff coverage is 50.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2538      +/-   ##
==========================================
+ Coverage   27.14%   27.18%   +0.03%     
==========================================
  Files         228      228              
  Lines       19644    19639       -5     
  Branches     4712     4710       -2     
==========================================
+ Hits         5333     5338       +5     
- Misses      13615    13823     +208     
+ Partials      696      478     -218     
Impacted Files Coverage Δ
src/SFML/Window/OSX/SFWindowController.mm 32.48% <50.00%> (+0.67%) ⬆️

... and 20 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cbfa9cb...d26625c. Read the comment docs.

@eXpl0it3r
Copy link
Member

eXpl0it3r commented Apr 29, 2023

I cherry-picked this on top of the changes in #2519, since it has such a nice test application, and it worked correctly.

And it might indeed be a candidate for SFML 2.6.1

@ChrisThrasher
Copy link
Member Author

ChrisThrasher commented Apr 29, 2023

And it might indeed be a candidate for SFML 2.6.1

How about we use SFML 3 to test this out? If it work well in master for a while then we can easily cherry-pick it onto 2.6.x.

@ChrisThrasher ChrisThrasher merged commit 839ad6c into SFML:master Apr 30, 2023
80 checks passed
@ChrisThrasher ChrisThrasher deleted the cocoa_resize_bug branch April 30, 2023 23:52
dogunbound added a commit to dogunbound/SFML that referenced this pull request Jul 15, 2023
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 SFML#2538
and see which we like best
ChrisThrasher pushed a commit that referenced this pull request Jul 30, 2023
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 #2538
and see which we like best
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants