Improved WindowState changes on SDL2 backend
SDL2 fails to report several different WindowState changes. OpenTK uses a number of hacks to make it work to some extent, however real fixes will have to be implemented upstream.
This commit is contained in:
parent
bc95084804
commit
d022e4c020
1 changed files with 4 additions and 4 deletions
|
@ -344,14 +344,13 @@ namespace OpenTK.Platform.SDL2
|
|||
break;
|
||||
|
||||
case WindowEventID.MAXIMIZED:
|
||||
window.previous_window_state = window.window_state;
|
||||
window.window_state = OpenTK.WindowState.Maximized;
|
||||
window.window_state = WindowState.Maximized;
|
||||
window.WindowStateChanged(window, EventArgs.Empty);
|
||||
break;
|
||||
|
||||
case WindowEventID.MINIMIZED:
|
||||
window.previous_window_state = window.window_state;
|
||||
window.window_state = OpenTK.WindowState.Minimized;
|
||||
window.window_state = WindowState.Minimized;
|
||||
window.WindowStateChanged(window, EventArgs.Empty);
|
||||
break;
|
||||
|
||||
|
@ -667,11 +666,12 @@ namespace OpenTK.Platform.SDL2
|
|||
case WindowState.Maximized:
|
||||
RestoreWindow();
|
||||
SDL.MaximizeWindow(window.Handle);
|
||||
HideShowWindowHack();
|
||||
window_state = WindowState.Maximized;
|
||||
break;
|
||||
|
||||
case WindowState.Minimized:
|
||||
SDL.MinimizeWindow(window.Handle);
|
||||
window_state = WindowState.Minimized;
|
||||
break;
|
||||
|
||||
case WindowState.Normal:
|
||||
|
|
Loading…
Reference in a new issue