Skip to content

Rename Window::set_inner_size to Window::request_inner_size#2930

Merged
kchibisov merged 2 commits intorust-windowing:masterfrom
kchibisov:set-inner-size-change
Jul 10, 2023
Merged

Rename Window::set_inner_size to Window::request_inner_size#2930
kchibisov merged 2 commits intorust-windowing:masterfrom
kchibisov:set-inner-size-change

Conversation

@kchibisov
Copy link
Copy Markdown
Member

@kchibisov kchibisov commented Jul 8, 2023

Some systems could resize the window immediately and we'd rather inform the users right away if that was the case, so they could create e.g. EGLSurface without waiting for resize, which is really important for Wayland.

Fixes #2868.

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

@kchibisov
Copy link
Copy Markdown
Member Author

Implementation on some platforms may not represent the actual state of things, I'd suggest to ensure at least macOS, Windows, Web implementations.

@daxpedda
Copy link
Copy Markdown
Member

daxpedda commented Jul 8, 2023

Should a Resized event be triggered after a Window::request_inner_size() even if the size didn't change because e.g. rounding or max-size reached?

I would say yes.

@kchibisov
Copy link
Copy Markdown
Member Author

Should a Resized event be triggered after a Window::request_inner_size() even if the size didn't change because e.g. rounding or max-size reached?

it's up to backend though. If server won't sent a new size it's up to it. Nothing we can do here to be fair.

@daxpedda
Copy link
Copy Markdown
Member

daxpedda commented Jul 8, 2023

Nothing we can do here to be fair.

On Web we can just request it.

Copy link
Copy Markdown
Member

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Web is correct like this, nothing more to be done here except the ongoing discussion about triggering the event if nothing changed.

kchibisov and others added 2 commits July 10, 2023 07:45
Some systems could resize the window immediately and we'd rather
inform the users right away if that was the case, so they could
create e.g. EGLSurface without waiting for resize, which is really
important for Wayland.

Fixes rust-windowing#2868.
Co-authored-by: Markus Siglreithmaier <m.siglreith@gmail.com>
@kchibisov kchibisov force-pushed the set-inner-size-change branch from 103db54 to 91f1794 Compare July 10, 2023 03:45
@kchibisov kchibisov merged commit ff0ce9d into rust-windowing:master Jul 10, 2023
@kchibisov kchibisov deleted the set-inner-size-change branch July 10, 2023 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Return the applied size for synchronious set_inner_size

4 participants