Browse Source

Add missing XFlush calls

Camilla Berglund 9 years ago
parent
commit
915a98c560
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/x11_window.c

+ 5 - 0
src/x11_window.c

@@ -1551,6 +1551,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
         centerCursor(window);
         centerCursor(window);
     }
     }
 
 
+    XFlush(_glfw.x11.display);
     return GLFW_TRUE;
     return GLFW_TRUE;
 }
 }
 
 
@@ -2034,6 +2035,8 @@ void _glfwPlatformPollEvents(void)
 
 
     if (_glfw.x11.disabledCursorWindow)
     if (_glfw.x11.disabledCursorWindow)
         centerCursor(_glfw.x11.disabledCursorWindow);
         centerCursor(_glfw.x11.disabledCursorWindow);
+
+    XFlush(_glfw.x11.display);
 }
 }
 
 
 void _glfwPlatformWaitEvents(void)
 void _glfwPlatformWaitEvents(void)
@@ -2106,6 +2109,7 @@ void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
 
 
     XWarpPointer(_glfw.x11.display, None, window->x11.handle,
     XWarpPointer(_glfw.x11.display, None, window->x11.handle,
                  0,0,0,0, (int) x, (int) y);
                  0,0,0,0, (int) x, (int) y);
+    XFlush(_glfw.x11.display);
 }
 }
 
 
 void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
 void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
@@ -2132,6 +2136,7 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
     }
     }
 
 
     updateCursorImage(window);
     updateCursorImage(window);
+    XFlush(_glfw.x11.display);
 }
 }
 
 
 const char* _glfwPlatformGetKeyName(int key, int scancode)
 const char* _glfwPlatformGetKeyName(int key, int scancode)