浏览代码

Wayland: Unset the cursor name on border exit

It would previously conserve the last name it had before leaving the
border, sometimes desynchronising with what it should have been.

(cherry picked from commit ef6189f348d7f911afe640e6b817e2e945dc86a1)
Emmanuel Gil Peyrot 5 年之前
父节点
当前提交
9db0bd45e6
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/wl_init.c

+ 2 - 0
src/wl_init.c

@@ -125,6 +125,7 @@ static void pointerHandleLeave(void* data,
     _glfw.wl.serial = serial;
     _glfw.wl.pointerFocus = NULL;
     _glfwInputCursorEnter(window, GLFW_FALSE);
+    _glfw.wl.cursorPreviousName = NULL;
 }
 
 static void setCursor(_GLFWwindow* window, const char* name)
@@ -196,6 +197,7 @@ static void pointerHandleMotion(void* data,
             window->wl.cursorPosX = x;
             window->wl.cursorPosY = y;
             _glfwInputCursorPos(window, x, y);
+            _glfw.wl.cursorPreviousName = NULL;
             return;
         case topDecoration:
             if (y < _GLFW_DECORATION_WIDTH)