mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Add Unix full screen key chord for no reason
This commit is contained in:
parent
608a33f72b
commit
9f1474c1d0
@ -237,9 +237,13 @@ void reshape( GLFWwindow* window, int w, int h )
|
|||||||
|
|
||||||
void key_callback( GLFWwindow* window, int key, int scancode, int action, int mods )
|
void key_callback( GLFWwindow* window, int key, int scancode, int action, int mods )
|
||||||
{
|
{
|
||||||
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
|
if (action != GLFW_PRESS)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (key == GLFW_KEY_ESCAPE && mods == 0)
|
||||||
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
||||||
if (key == GLFW_KEY_ENTER && action == GLFW_PRESS && mods == GLFW_MOD_ALT)
|
if ((key == GLFW_KEY_ENTER && mods == GLFW_MOD_ALT) ||
|
||||||
|
(key == GLFW_KEY_F11 && mods == GLFW_MOD_ALT))
|
||||||
{
|
{
|
||||||
if (glfwGetWindowMonitor(window))
|
if (glfwGetWindowMonitor(window))
|
||||||
{
|
{
|
||||||
|
@ -76,6 +76,7 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
|||||||
case GLFW_KEY_ESCAPE:
|
case GLFW_KEY_ESCAPE:
|
||||||
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
||||||
break;
|
break;
|
||||||
|
case GLFW_KEY_F11:
|
||||||
case GLFW_KEY_ENTER:
|
case GLFW_KEY_ENTER:
|
||||||
{
|
{
|
||||||
if (mods != GLFW_MOD_ALT)
|
if (mods != GLFW_MOD_ALT)
|
||||||
|
Loading…
Reference in New Issue
Block a user