[*] allow for awal to manage exclusive mode switch via the dal swapchain

This commit is contained in:
Reece Wilson 2023-11-16 07:25:09 +00:00
parent ad3b49580a
commit 2eed28ed54
4 changed files with 14 additions and 2 deletions

View File

@ -920,6 +920,8 @@ extern "C" {
*/
#define GLFW_FOCUS_ON_SHOW 0x0002000C
#define GLFW_HANDLE_EXCLUSIVE_MODE 0x1F020000
/*! @brief Mouse input transparency window hint and attribute
*
* Mouse input transparency [window hint](@ref GLFW_MOUSE_PASSTHROUGH_hint) or

View File

@ -413,6 +413,7 @@ struct _GLFWwndconfig
GLFWbool focusOnShow;
GLFWbool mousePassthrough;
GLFWbool scaleToMonitor;
GLFWbool exclusiveMode;
struct {
GLFWbool retina;
char frameName[256];

View File

@ -493,7 +493,10 @@ static void acquireMonitor(_GLFWwindow* window)
if (!window->monitor->window)
_glfw.win32.acquiredMonitorCount++;
_glfwSetVideoModeWin32(window->monitor, &window->videoMode);
if (_glfw.hints.window.exclusiveMode)
{
_glfwSetVideoModeWin32(window->monitor, &window->videoMode);
}
_glfwInputMonitorWindow(window->monitor, window);
}
@ -514,7 +517,10 @@ static void releaseMonitor(_GLFWwindow* window)
}
_glfwInputMonitorWindow(window->monitor, NULL);
_glfwRestoreVideoModeWin32(window->monitor);
if (_glfw.hints.window.exclusiveMode)
{
_glfwRestoreVideoModeWin32(window->monitor);
}
}
// Manually maximize the window, for when SW_MAXIMIZE cannot be used

View File

@ -369,6 +369,9 @@ GLFWAPI void glfwWindowHint(int hint, int value)
case GLFW_FLOATING:
_glfw.hints.window.floating = value ? GLFW_TRUE : GLFW_FALSE;
return;
case GLFW_HANDLE_EXCLUSIVE_MODE:
_glfw.hints.window.exclusiveMode = value ? GLFW_TRUE : GLFW_FALSE;
return;
case GLFW_MAXIMIZED:
_glfw.hints.window.maximized = value ? GLFW_TRUE : GLFW_FALSE;
return;