[*] allow for awal to manage exclusive mode switch via the dal swapchain
This commit is contained in:
parent
ad3b49580a
commit
2eed28ed54
@ -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
|
||||
|
@ -413,6 +413,7 @@ struct _GLFWwndconfig
|
||||
GLFWbool focusOnShow;
|
||||
GLFWbool mousePassthrough;
|
||||
GLFWbool scaleToMonitor;
|
||||
GLFWbool exclusiveMode;
|
||||
struct {
|
||||
GLFWbool retina;
|
||||
char frameName[256];
|
||||
|
@ -493,7 +493,10 @@ static void acquireMonitor(_GLFWwindow* window)
|
||||
if (!window->monitor->window)
|
||||
_glfw.win32.acquiredMonitorCount++;
|
||||
|
||||
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);
|
||||
if (_glfw.hints.window.exclusiveMode)
|
||||
{
|
||||
_glfwRestoreVideoModeWin32(window->monitor);
|
||||
}
|
||||
}
|
||||
|
||||
// Manually maximize the window, for when SW_MAXIMIZE cannot be used
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user