Skip to content
Snippets Groups Projects
Commit e74ebf0b authored by Arseny Kapoulkine's avatar Arseny Kapoulkine Committed by Camilla Berglund
Browse files

Fix cursor behavior on OS X.

Don't implement resetCursorRects: this occasionally hides the cursor
since an empty cursor is assigned to the window rectangle.  Implementing
this method is not required since OS displays the window cursor
correctly by default.

Don't reset cursor mode when window loses focus: once again, OS handles
this correctly, and this means that the window cursor state is restored
when window gains focus again.
parent 26f86ac5
No related branches found
No related tags found
No related merge requests found
......@@ -197,8 +197,6 @@ static NSRect convertRectToBacking(_GLFWwindow* window, NSRect contentRect)
- (void)windowDidResignKey:(NSNotification *)notification
{
_glfwInputWindowFocus(window, GL_FALSE);
window->cursorMode = GLFW_CURSOR_NORMAL;
_glfwPlatformApplyCursorMode(window);
}
@end
......@@ -675,14 +673,6 @@ static int translateKey(unsigned int key)
_glfwInputScroll(window, deltaX, deltaY);
}
- (void)resetCursorRects
{
// This makes the cursor dissapear when the window is
// resized or received a drag operation
[self discardCursorRects];
[self addCursorRect:[self bounds] cursor:_glfw.ns.cursor];
}
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
if ((NSDragOperationGeneric & [sender draggingSourceOperationMask])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment