summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-09-17 11:37:54 -0300
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-09-17 11:37:54 -0300
commit360204e532345999f4d986cc77194c20d53a8cae (patch)
tree4311ffbbf20b9e0a76ab23fe249d5291e6133b19 /platform/x11
parentebd14a778d29e0de4904564a762358cbc2412303 (diff)
Fix Input::set_custom_mouse_cursor showing cursor when it's invisible
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/os_x11.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 24dfe541f9..88036c28e3 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -2607,7 +2607,9 @@ void OS_X11::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c
cursors[p_shape] = XcursorImageLoadCursor(x11_display, cursor_image);
if (p_shape == current_cursor) {
- XDefineCursor(x11_display, x11_window, cursors[p_shape]);
+ if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) {
+ XDefineCursor(x11_display, x11_window, cursors[p_shape]);
+ }
}
memfree(cursor_image->pixels);