|
@@ -180,47 +180,45 @@ static void pointerHandleMotion(void* data,
|
|
{
|
|
{
|
|
_GLFWwindow* window = _glfw.wl.pointerFocus;
|
|
_GLFWwindow* window = _glfw.wl.pointerFocus;
|
|
const char* cursorName = NULL;
|
|
const char* cursorName = NULL;
|
|
|
|
+ double x, y;
|
|
|
|
|
|
if (!window)
|
|
if (!window)
|
|
return;
|
|
return;
|
|
|
|
|
|
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
|
if (window->cursorMode == GLFW_CURSOR_DISABLED)
|
|
return;
|
|
return;
|
|
- else
|
|
|
|
- {
|
|
|
|
- window->wl.cursorPosX = wl_fixed_to_double(sx);
|
|
|
|
- window->wl.cursorPosY = wl_fixed_to_double(sy);
|
|
|
|
- }
|
|
|
|
|
|
+ x = wl_fixed_to_double(sx);
|
|
|
|
+ y = wl_fixed_to_double(sy);
|
|
|
|
|
|
switch (window->wl.decorations.focus)
|
|
switch (window->wl.decorations.focus)
|
|
{
|
|
{
|
|
case mainWindow:
|
|
case mainWindow:
|
|
- _glfwInputCursorPos(window,
|
|
|
|
- wl_fixed_to_double(sx),
|
|
|
|
- wl_fixed_to_double(sy));
|
|
|
|
|
|
+ window->wl.cursorPosX = x;
|
|
|
|
+ window->wl.cursorPosY = y;
|
|
|
|
+ _glfwInputCursorPos(window, x, y);
|
|
return;
|
|
return;
|
|
case topDecoration:
|
|
case topDecoration:
|
|
- if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)
|
|
|
|
|
|
+ if (y < _GLFW_DECORATION_WIDTH)
|
|
cursorName = "n-resize";
|
|
cursorName = "n-resize";
|
|
else
|
|
else
|
|
cursorName = "left_ptr";
|
|
cursorName = "left_ptr";
|
|
break;
|
|
break;
|
|
case leftDecoration:
|
|
case leftDecoration:
|
|
- if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)
|
|
|
|
|
|
+ if (y < _GLFW_DECORATION_WIDTH)
|
|
cursorName = "nw-resize";
|
|
cursorName = "nw-resize";
|
|
else
|
|
else
|
|
cursorName = "w-resize";
|
|
cursorName = "w-resize";
|
|
break;
|
|
break;
|
|
case rightDecoration:
|
|
case rightDecoration:
|
|
- if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)
|
|
|
|
|
|
+ if (y < _GLFW_DECORATION_WIDTH)
|
|
cursorName = "ne-resize";
|
|
cursorName = "ne-resize";
|
|
else
|
|
else
|
|
cursorName = "e-resize";
|
|
cursorName = "e-resize";
|
|
break;
|
|
break;
|
|
case bottomDecoration:
|
|
case bottomDecoration:
|
|
- if (window->wl.cursorPosX < _GLFW_DECORATION_WIDTH)
|
|
|
|
|
|
+ if (x < _GLFW_DECORATION_WIDTH)
|
|
cursorName = "sw-resize";
|
|
cursorName = "sw-resize";
|
|
- else if (window->wl.cursorPosX > window->wl.width + _GLFW_DECORATION_WIDTH)
|
|
|
|
|
|
+ else if (x > window->wl.width + _GLFW_DECORATION_WIDTH)
|
|
cursorName = "se-resize";
|
|
cursorName = "se-resize";
|
|
else
|
|
else
|
|
cursorName = "s-resize";
|
|
cursorName = "s-resize";
|