Fix the diagonal resize shapes on Linux

This commit is contained in:
Kovid Goyal 2023-10-17 21:15:20 +05:30
parent 6804d16519
commit e9e1a7a7c3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 10 additions and 8 deletions

View File

@ -43,8 +43,8 @@
ew-resize ew-resize ew-resize,!sb_h_double_arrow,split_h ew_resize resizeLeftRightCursor
ns-resize ns-resize ns-resize,!sb_v_double_arrow,split_v ns_resize resizeUpDownCursor
nesw-resize nesw-resize nesw-resize,size_bdiag,!sb_v_double_arrow nesw_resize _windowResizeNorthEastSouthWestCursor
nwse-resize nwse-resize nwse-resize,size_fdiag,!sb_h_double_arrow nwse_resize _windowResizeNorthWestSouthEastCursor
nesw-resize nesw-resize nesw-resize,size_bdiag,size-bdiag nesw_resize _windowResizeNorthEastSouthWestCursor
nwse-resize nwse-resize nwse-resize,size_fdiag,size-fdiag nwse_resize _windowResizeNorthWestSouthEastCursor
zoom-in zoom-in zoom-in,zoom_in zoom_in zoomin:arrowCursor
zoom-out zoom-out zoom-out,zoom_out zoom_out zoomout:arrowCursor

4
glfw/wl_window.c vendored
View File

@ -852,8 +852,8 @@ struct wl_cursor* _glfwLoadCursor(GLFWCursorShape shape, struct wl_cursor_theme*
C(GLFW_W_RESIZE_CURSOR, "w-resize", "left_side");
C(GLFW_EW_RESIZE_CURSOR, "ew-resize", "sb_h_double_arrow", "split_h");
C(GLFW_NS_RESIZE_CURSOR, "ns-resize", "sb_v_double_arrow", "split_v");
C(GLFW_NESW_RESIZE_CURSOR, "nesw-resize", "size_bdiag", "sb_v_double_arrow");
C(GLFW_NWSE_RESIZE_CURSOR, "nwse-resize", "size_fdiag", "sb_h_double_arrow");
C(GLFW_NESW_RESIZE_CURSOR, "nesw-resize", "size_bdiag", "size-bdiag");
C(GLFW_NWSE_RESIZE_CURSOR, "nwse-resize", "size_fdiag", "size-fdiag");
C(GLFW_ZOOM_IN_CURSOR, "zoom-in", "zoom_in");
C(GLFW_ZOOM_OUT_CURSOR, "zoom-out", "zoom_out");
C(GLFW_ALIAS_CURSOR, "dnd-link");

4
glfw/x11_window.c vendored
View File

@ -2867,8 +2867,8 @@ int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, GLFWCursorShape shape
case GLFW_W_RESIZE_CURSOR: return set_cursor_from_font(cursor, XC_left_side);
case GLFW_EW_RESIZE_CURSOR: return set_cursor_from_font(cursor, XC_sb_h_double_arrow);
case GLFW_NS_RESIZE_CURSOR: return set_cursor_from_font(cursor, XC_sb_v_double_arrow);
case GLFW_NESW_RESIZE_CURSOR: return set_cursor_from_font(cursor, XC_sb_v_double_arrow);
case GLFW_NWSE_RESIZE_CURSOR: return set_cursor_from_font(cursor, XC_sb_h_double_arrow);
case GLFW_NESW_RESIZE_CURSOR: return try_cursor_names(cursor, 3, "nesw-resize", "size_bdiag", "size-bdiag");
case GLFW_NWSE_RESIZE_CURSOR: return try_cursor_names(cursor, 3, "nwse-resize", "size_fdiag", "size-fdiag");
case GLFW_ZOOM_IN_CURSOR: return try_cursor_names(cursor, 2, "zoom-in", "zoom_in");
case GLFW_ZOOM_OUT_CURSOR: return try_cursor_names(cursor, 2, "zoom-out", "zoom_out");
case GLFW_ALIAS_CURSOR: return try_cursor_names(cursor, 1, "dnd-link");

View File

@ -1261,12 +1261,14 @@ change_pointer_shape(Screen *self, PyObject *args) {
else if (strcmp("bottom_left_corner", css_name) == 0) s = SW_RESIZE_POINTER;
else if (strcmp("bottom_side", css_name) == 0) s = S_RESIZE_POINTER;
else if (strcmp("left_side", css_name) == 0) s = W_RESIZE_POINTER;
else if (strcmp("sb_h_double_arrow", css_name) == 0) s = NWSE_RESIZE_POINTER;
else if (strcmp("sb_h_double_arrow", css_name) == 0) s = EW_RESIZE_POINTER;
else if (strcmp("split_h", css_name) == 0) s = EW_RESIZE_POINTER;
else if (strcmp("sb_v_double_arrow", css_name) == 0) s = NESW_RESIZE_POINTER;
else if (strcmp("sb_v_double_arrow", css_name) == 0) s = NS_RESIZE_POINTER;
else if (strcmp("split_v", css_name) == 0) s = NS_RESIZE_POINTER;
else if (strcmp("size_bdiag", css_name) == 0) s = NESW_RESIZE_POINTER;
else if (strcmp("size-bdiag", css_name) == 0) s = NESW_RESIZE_POINTER;
else if (strcmp("size_fdiag", css_name) == 0) s = NWSE_RESIZE_POINTER;
else if (strcmp("size-fdiag", css_name) == 0) s = NWSE_RESIZE_POINTER;
else if (strcmp("zoom_in", css_name) == 0) s = ZOOM_IN_POINTER;
else if (strcmp("zoom_out", css_name) == 0) s = ZOOM_OUT_POINTER;
else if (strcmp("dnd-link", css_name) == 0) s = ALIAS_POINTER;