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 InnerSize command not resizing viewport #4207

Closed
wants to merge 1 commit into from

Conversation

ColinKinloch
Copy link
Contributor

On some platforms changing window size via request_inner_size doesn't trigger a Resized event, in this case the viewport is not resized.

I'm new to this project and I think that this MR needs work.

What would the correct way to send the return value of request_inner_size to the resize function of the glutin surface?

.request_inner_size(PhysicalSize::new(width_px, height_px))

Would setting viewport.info.inner_rect and resizing from that be correct?

On some platforms changing window size via `request_inner_size` doesn't
trigger a `Resized` event, in this case the viewport is not resized.
@rustbasic
Copy link
Contributor

@ColinKinloch

Check if this is not needed if you apply PR #4182.

@ColinKinloch
Copy link
Contributor Author

The issue is still present in #4182

@rustbasic
Copy link
Contributor

rustbasic commented Mar 22, 2024

The issue is still present in #4182

egui-winit/src/lib.rs 800 line ~ 900 line

    let has_a_position = match window.is_minimized() {
        None | Some(true) => false,
        Some(false) => true,
    };

to

    let has_a_position = match window.is_minimized() {
        Some(true) => false,
        Some(false) | None => true,
    };

It may be because of this part.

yet again,

If you apply PR #4211, please make sure this is not necessary.

Please let me know the results.

@rustbasic
Copy link
Contributor

The issue is still present in #4182

@ColinKinloch

I changed this a little more.
Could you try this one more time and let me know the results?

@ColinKinloch
Copy link
Contributor Author

Closed in favour of #4211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On wayland ViewportCommand::InnerSize doesn't update the content size
2 participants