mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-10 23:35:29 +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
2b7ed38569
commit
ddcf5f6e44
|
@ -60,8 +60,9 @@ namespace OpenTK.Platform.Windows
|
||||||
bool disposed;
|
bool disposed;
|
||||||
bool exists;
|
bool exists;
|
||||||
WinWindowInfo window, child_window;
|
WinWindowInfo window, child_window;
|
||||||
WindowBorder windowBorder = WindowBorder.Resizable, previous_window_border;
|
WindowBorder windowBorder = WindowBorder.Resizable;
|
||||||
WindowBorder deferred_window_border; // Set to avoid changing borders during fullscreen states.
|
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;
|
WindowState windowState = WindowState.Normal;
|
||||||
bool borderless_maximized_window_state = false; // Hack to get maximized mode with hidden border (not normally possible).
|
bool borderless_maximized_window_state = false; // Hack to get maximized mode with hidden border (not normally possible).
|
||||||
bool focused;
|
bool focused;
|
||||||
|
@ -910,8 +911,11 @@ namespace OpenTK.Platform.Windows
|
||||||
// Restore previous window border or apply pending border change when leaving fullscreen mode.
|
// Restore previous window border or apply pending border change when leaving fullscreen mode.
|
||||||
if (exiting_fullscreen)
|
if (exiting_fullscreen)
|
||||||
{
|
{
|
||||||
WindowBorder = deferred_window_border != 0 ? deferred_window_border : previous_window_border;
|
WindowBorder =
|
||||||
deferred_window_border = previous_window_border = 0;
|
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>
|
/// <summary>
|
||||||
/// The window has a resizable border. A window with a resizable border can be resized by the user or programmatically.
|
/// The window has a resizable border. A window with a resizable border can be resized by the user or programmatically.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Resizable = 1,
|
Resizable = 0,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The window has a fixed border. A window with a fixed border can only be resized programmatically.
|
/// The window has a fixed border. A window with a fixed border can only be resized programmatically.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace OpenTK
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The window is in its normal state.
|
/// The window is in its normal state.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Normal = 1,
|
Normal = 0,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The window is minimized to the taskbar (also known as 'iconified').
|
/// The window is minimized to the taskbar (also known as 'iconified').
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in a new issue