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

Resize GlWindow #106

Merged
merged 2 commits into from
Feb 10, 2019
Merged

Resize GlWindow #106

merged 2 commits into from
Feb 10, 2019

Conversation

trimental
Copy link
Contributor

Fixes #32

Resizes the GlWindow

@trimental trimental mentioned this pull request Feb 10, 2019
@coveralls
Copy link

coveralls commented Feb 10, 2019

Pull Request Test Coverage Report for Build 786

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Totals Coverage Status
Change from base Build 784: 0.0%
Covered Lines: 0
Relevant Lines: 1454

💛 - Coveralls

@fschutt
Copy link
Owner

fschutt commented Feb 10, 2019

Since this only happens on Linux, could you wrap this in a #[cfg(target_os = "linux")]? The reason is that programatically resizing the window might produce bugs on other platforms, so it would be better to target only Linux.

@trimental
Copy link
Contributor Author

Are you sure? I would say that resizing the GlWindow is a function that glutin expects to be called and not meant to be used just on linux or wayland (although in this case it fixes specifically a linux issue).

Although if you’d rather keep this contained to linux I can change it.

@fschutt fschutt merged commit 58231d2 into fschutt:master Feb 10, 2019
@fschutt
Copy link
Owner

fschutt commented Feb 10, 2019

I can't see any difference between calling it and not calling it on Windows. Calling GlWindow::resize just doesn't do anything (on Windows) and in the worst case could lead to extra jitter during resizing (since the resize should be handled by the window manager, in this case DWM). I also think that this is more or less patching around Linux-specific bugs that should rather be solved in winit / glium - calling GlWindow::resize should not be necessary, winit should do it automatically. But for now it's better that it works at all.

@trimental trimental deleted the gl-resize branch March 9, 2019 07:22
fschutt added a commit that referenced this pull request May 13, 2019
Resize the GlWindow programatically to fix resizing bugs on Wayland (fixes #32).
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.

3 participants