mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 15:05:43 +00:00
Revert WindowBorder and WindowState value changes.
Use Nullable types to detect when WindowBorder and WindowState is not set.
This commit is contained in:
parent
65e9d6d969
commit
c80cac88ca
|
@ -60,8 +60,9 @@ namespace OpenTK.Platform.Windows
|
|||
bool disposed;
|
||||
bool exists;
|
||||
WinWindowInfo window, child_window;
|
||||
WindowBorder windowBorder = WindowBorder.Resizable, previous_window_border;
|
||||
WindowBorder deferred_window_border; // Set to avoid changing borders during fullscreen states.
|
||||
WindowBorder windowBorder = WindowBorder.Resizable;
|
||||
Nullable<WindowBorder> previous_window_border; // Set when changing to fullscreen state.
|
||||
Nullable<WindowBorder> deferred_window_border; // Set to avoid changing borders during fullscreen state.
|
||||
WindowState windowState = WindowState.Normal;
|
||||
bool borderless_maximized_window_state = false; // Hack to get maximized mode with hidden border (not normally possible).
|
||||
bool focused;
|
||||
|
@ -910,8 +911,11 @@ namespace OpenTK.Platform.Windows
|
|||
// Restore previous window border or apply pending border change when leaving fullscreen mode.
|
||||
if (exiting_fullscreen)
|
||||
{
|
||||
WindowBorder = deferred_window_border != 0 ? deferred_window_border : previous_window_border;
|
||||
deferred_window_border = previous_window_border = 0;
|
||||
WindowBorder =
|
||||
deferred_window_border.HasValue ? deferred_window_border.Value :
|
||||
previous_window_border.HasValue ? previous_window_border.Value :
|
||||
WindowBorder;
|
||||
deferred_window_border = previous_window_border = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace OpenTK
|
|||
/// <summary>
|
||||
/// The window has a resizable border. A window with a resizable border can be resized by the user or programmatically.
|
||||
/// </summary>
|
||||
Resizable = 1,
|
||||
Resizable = 0,
|
||||
/// <summary>
|
||||
/// The window has a fixed border. A window with a fixed border can only be resized programmatically.
|
||||
/// </summary>
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace OpenTK
|
|||
/// <summary>
|
||||
/// The window is in its normal state.
|
||||
/// </summary>
|
||||
Normal = 1,
|
||||
Normal = 0,
|
||||
/// <summary>
|
||||
/// The window is minimized to the taskbar (also known as 'iconified').
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in a new issue