Add glfwDragWindow

This is the initial implementation of glfwDragWindow, with support for
X11. The function glfwDragWindow requires only the target window to be
dragged. To make the function easier and more portable, the position of
the window and of the cursor are grabbed internally, so the end-user do
not need to pass them manually.

The example 'simple.c' was updated to include this functionality when
clicking on the client area of the window.
This commit is contained in:
Felipe Ferreira da Silva
2017-04-05 22:14:09 -03:00
committed by Camilla Löwy
parent 5b7281bd41
commit a4c76fbeed
11 changed files with 80 additions and 0 deletions
+15
View File
@@ -2929,6 +2929,21 @@ GLFWAPI void glfwHideWindow(GLFWwindow* window);
*/
GLFWAPI void glfwFocusWindow(GLFWwindow* window);
/*! @brief Starts drag operation to the specified window.
*
* This function starts the drag operation of the specified window.
*
* @param[in] window The window to start the dragging operation.
* @thread_safety This function must only be called from the main thread.
*
* @sa @ref window_drag
*
* @since Added in version 3.2.
*
* @ingroup window
*/
GLFWAPI void glfwDragWindow(GLFWwindow* handle);
/*! @brief Requests user attention to the specified window.
*
* This function requests user attention to the specified window. On