Added input function for window damage events.

master
Camilla Berglund ago%!(EXTRA string=14 years)
parent de147988f2
commit 72ef537425
  1. 1
      src/internal.h
  2. 4
      src/win32_window.c
  3. 11
      src/window.c
  4. 4
      src/x11_window.c

@ -344,6 +344,7 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLboolean activated);
void _glfwInputWindowPos(_GLFWwindow* window, int x, int y);
void _glfwInputWindowSize(_GLFWwindow* window, int width, int height);
void _glfwInputWindowIconify(_GLFWwindow* window, int iconified);
void _glfwInputWindowDamage(_GLFWwindow* window);
// Input event notification
void _glfwInputKey(_GLFWwindow* window, int key, int action);

@ -1069,9 +1069,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
// Was the window contents damaged?
case WM_PAINT:
{
if (_glfwLibrary.windowRefreshCallback)
_glfwLibrary.windowRefreshCallback(window);
_glfwInputWindowDamage(window);
break;
}

@ -195,6 +195,17 @@ void _glfwInputWindowIconify(_GLFWwindow* window, int iconified)
}
//========================================================================
// Register window damage events
//========================================================================
void _glfwInputWindowDamage(_GLFWwindow* window)
{
if (_glfwLibrary.windowRefreshCallback)
_glfwLibrary.windowRefreshCallback(window);
}
//////////////////////////////////////////////////////////////////////////
////// GLFW public API //////
//////////////////////////////////////////////////////////////////////////

@ -1349,9 +1349,7 @@ static void processSingleEvent(void)
return;
}
if (_glfwLibrary.windowRefreshCallback)
_glfwLibrary.windowRefreshCallback(window);
_glfwInputWindowDamage(window);
break;
}

Loading…
Cancel
Save