Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
5bfe32ea
Commit
5bfe32ea
authored
Oct 03, 2019
by
PouleyKetchoupp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly revert cursor when using set_custom_mouse_cursor with null
Fixes #32486
parent
09bf1b35
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
2 deletions
+16
-2
os_javascript.cpp
platform/javascript/os_javascript.cpp
+2
-0
os_osx.mm
platform/osx/os_osx.mm
+6
-1
os_windows.cpp
platform/windows/os_windows.cpp
+6
-1
os_x11.cpp
platform/x11/os_x11.cpp
+2
-0
No files found.
platform/javascript/os_javascript.cpp
View file @
5bfe32ea
...
...
@@ -574,6 +574,8 @@ void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_s
},
cursors
[
p_shape
].
utf8
().
get_data
());
/* clang-format on */
cursors
[
p_shape
]
=
""
;
cursors_cache
.
erase
(
p_shape
);
}
set_cursor_shape
(
cursor_shape
);
...
...
platform/osx/os_osx.mm
View file @
5bfe32ea
...
...
@@ -1973,11 +1973,16 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c
[nsimage release];
} else {
// Reset to default system cursor
cursors[p_shape] = NULL;
if (cursors[p_shape] != NULL) {
[cursors[p_shape] release];
cursors[p_shape] = NULL;
}
CursorShape c = cursor_shape;
cursor_shape = CURSOR_MAX;
set_cursor_shape(c);
cursors_cache.erase(p_shape);
}
}
...
...
platform/windows/os_windows.cpp
View file @
5bfe32ea
...
...
@@ -2485,11 +2485,16 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap
DeleteObject
(
bitmap
);
}
else
{
// Reset to default system cursor
cursors
[
p_shape
]
=
NULL
;
if
(
cursors
[
p_shape
])
{
DestroyIcon
(
cursors
[
p_shape
]);
cursors
[
p_shape
]
=
NULL
;
}
CursorShape
c
=
cursor_shape
;
cursor_shape
=
CURSOR_MAX
;
set_cursor_shape
(
c
);
cursors_cache
.
erase
(
p_shape
);
}
}
...
...
platform/x11/os_x11.cpp
View file @
5bfe32ea
...
...
@@ -2996,6 +2996,8 @@ void OS_X11::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c
CursorShape
c
=
current_cursor
;
current_cursor
=
CURSOR_MAX
;
set_cursor_shape
(
c
);
cursors_cache
.
erase
(
p_shape
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment