Skip to content

Commit 4f3dddb

Browse files
committed
Merge pull request #101987 from Riteo/imagine-using-rids
Wayland: Check custom cursor resource reference for cache invalidation
2 parents 295a1dd + c808756 commit 4f3dddb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

platform/linuxbsd/wayland/display_server_wayland.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ void DisplayServerWayland::cursor_set_custom_image(const Ref<Resource> &p_cursor
10711071
HashMap<CursorShape, CustomCursor>::Iterator cursor_c = custom_cursors.find(p_shape);
10721072

10731073
if (cursor_c) {
1074-
if (cursor_c->value.rid == p_cursor->get_rid() && cursor_c->value.hotspot == p_hotspot) {
1074+
if (cursor_c->value.resource == p_cursor && cursor_c->value.hotspot == p_hotspot) {
10751075
// We have a cached cursor. Nice.
10761076
wayland_thread.cursor_set_shape(p_shape);
10771077
return;
@@ -1087,7 +1087,7 @@ void DisplayServerWayland::cursor_set_custom_image(const Ref<Resource> &p_cursor
10871087

10881088
CustomCursor &cursor = custom_cursors[p_shape];
10891089

1090-
cursor.rid = p_cursor->get_rid();
1090+
cursor.resource = p_cursor;
10911091
cursor.hotspot = p_hotspot;
10921092

10931093
wayland_thread.cursor_shape_set_custom_image(p_shape, image, p_hotspot);

platform/linuxbsd/wayland/display_server_wayland.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class DisplayServerWayland : public DisplayServer {
101101
};
102102

103103
struct CustomCursor {
104-
RID rid;
104+
Ref<Resource> resource;
105105
Point2i hotspot;
106106
};
107107

0 commit comments

Comments
 (0)