8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Maximize the window, go full screen, try go back, it's stuck.
But if you quickly switch to normal before going full screen, it works; try change bug to false.
bug
false
Also, the value of window state is wrong sometimes, it doesn't always follow the actual state of the window.
For desktop, version 2.16.0
using System.Drawing; using Silk.NET.Input; using Silk.NET.OpenGL; using Silk.NET.Windowing; // ReSharper disable AccessToDisposedClosure namespace Silk_Test; internal static class Program { private static void Main(string[] args) { var bug = true; // try change this using var window = Window.Create(WindowOptions.Default); // ReSharper disable once RedundantAssignment IInputContext input = null!; GL gl = null!; window.Load += () => { gl = window.CreateOpenGL(); input = window.CreateInput(); input.Keyboards[0].KeyDown += OnKeyDown; }; void OnKeyDown(IKeyboard keyboard, Key key, int code) { if (keyboard.IsKeyPressed(Key.AltLeft) && keyboard.IsKeyPressed(Key.Enter)) { if (bug) { switch (window.WindowState) { case WindowState.Normal: window.WindowState = WindowState.Fullscreen; break; case WindowState.Minimized: break; case WindowState.Maximized: window.WindowState = WindowState.Fullscreen; break; case WindowState.Fullscreen: window.WindowState = WindowState.Normal; break; default: throw new ArgumentOutOfRangeException(); } } else { switch (window.WindowState) { case WindowState.Normal: window.WindowState = WindowState.Fullscreen; break; case WindowState.Minimized: break; case WindowState.Maximized: window.WindowState = WindowState.Normal; window.WindowState = WindowState.Fullscreen; break; case WindowState.Fullscreen: window.WindowState = WindowState.Normal; break; default: throw new ArgumentOutOfRangeException(); } } } if (keyboard.IsKeyPressed(Key.Escape)) window.Close(); } window.Render += d => { var color = window.WindowState switch { WindowState.Normal => Color.Red, WindowState.Minimized => Color.Green, WindowState.Maximized => Color.Blue, WindowState.Fullscreen => Color.White, _ => throw new ArgumentOutOfRangeException() }; gl.ClearColor(color); gl.Clear(ClearBufferMask.ColorBufferBit); }; window.Run(); } }
The text was updated successfully, but these errors were encountered:
Fix #821, fix #1094
643d812
4b7976b
Perksey
No branches or pull requests
Summary
Maximize the window, go full screen, try go back, it's stuck.
But if you quickly switch to normal before going full screen, it works; try change
bug
tofalse
.Also, the value of window state is wrong sometimes, it doesn't always follow the actual state of the window.
Steps to reproduce
For desktop, version 2.16.0
The text was updated successfully, but these errors were encountered: