Merge branch 'glfw_reduce_difference' of https://github.com/Luflosi/kitty

This commit is contained in:
Kovid Goyal 2019-07-28 10:48:22 +05:30
commit d3750b2244
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 10 additions and 14 deletions

View File

@ -715,8 +715,7 @@ static GLFWapplicationshouldhandlereopenfun handle_reopen_callback = NULL;
- (void)mouseDown:(NSEvent *)event - (void)mouseDown:(NSEvent *)event
{ {
if (!window) return; if (!window) return;
_glfwInputMouseClick( _glfwInputMouseClick(window,
window,
GLFW_MOUSE_BUTTON_LEFT, GLFW_MOUSE_BUTTON_LEFT,
GLFW_PRESS, GLFW_PRESS,
translateFlags([event modifierFlags])); translateFlags([event modifierFlags]));
@ -730,8 +729,7 @@ static GLFWapplicationshouldhandlereopenfun handle_reopen_callback = NULL;
- (void)mouseUp:(NSEvent *)event - (void)mouseUp:(NSEvent *)event
{ {
if (!window) return; if (!window) return;
_glfwInputMouseClick( _glfwInputMouseClick(window,
window,
GLFW_MOUSE_BUTTON_LEFT, GLFW_MOUSE_BUTTON_LEFT,
GLFW_RELEASE, GLFW_RELEASE,
translateFlags([event modifierFlags])); translateFlags([event modifierFlags]));

4
glfw/input.c vendored
View File

@ -256,7 +256,7 @@ static bool parseMapping(_GLFWmapping* mapping, const char* string)
////// GLFW event API ////// ////// GLFW event API //////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Notifies shared code of a key event // Notifies shared code of a physical key event
// //
void _glfwInputKeyboard(_GLFWwindow* window, int key, int scancode, int action, int mods, const char* text, int state) void _glfwInputKeyboard(_GLFWwindow* window, int key, int scancode, int action, int mods, const char* text, int state)
{ {
@ -568,7 +568,7 @@ const char* _glfwGetKeyName(int key)
} }
} }
// Center the cursor in the middle of the content area of the specified window // Center the cursor in the content area of the specified window
// //
void _glfwCenterCursorInContentArea(_GLFWwindow* window) void _glfwCenterCursorInContentArea(_GLFWwindow* window)
{ {

2
glfw/window.c vendored
View File

@ -183,7 +183,6 @@ void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor)
window->monitor = monitor; window->monitor = monitor;
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
////// GLFW public API ////// ////// GLFW public API //////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
@ -1167,6 +1166,5 @@ GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow*
GLFWAPI void glfwPostEmptyEvent(void) GLFWAPI void glfwPostEmptyEvent(void)
{ {
_GLFW_REQUIRE_INIT(); _GLFW_REQUIRE_INIT();
_glfwPlatformPostEmptyEvent(); _glfwPlatformPostEmptyEvent();
} }