mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 18:37:50 +00:00
Merge branch 'x11_enter' of https://github.com/martinetd/kitty
This commit is contained in:
commit
30c6c4697f
1 changed files with 8 additions and 0 deletions
8
glfw/x11_window.c
vendored
8
glfw/x11_window.c
vendored
|
|
@ -1291,12 +1291,20 @@ static void processEvent(XEvent *event)
|
|||
|
||||
case EnterNotify:
|
||||
{
|
||||
// XEnterWindowEvent is XCrossingEvent
|
||||
const int x = event->xcrossing.x;
|
||||
const int y = event->xcrossing.y;
|
||||
|
||||
// HACK: This is a workaround for WMs (KWM, Fluxbox) that otherwise
|
||||
// ignore the defined cursor for hidden cursor mode
|
||||
if (window->cursorMode == GLFW_CURSOR_HIDDEN)
|
||||
updateCursorImage(window);
|
||||
|
||||
_glfwInputCursorEnter(window, GLFW_TRUE);
|
||||
_glfwInputCursorPos(window, x, y);
|
||||
|
||||
window->x11.lastCursorPosX = x;
|
||||
window->x11.lastCursorPosY = y;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue