]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Chase wlroots: Use wlr_cursor_set_xcursor()
authorJohn Lindgren <john@jlindgren.net>
Mon, 17 Jul 2023 06:01:02 +0000 (02:01 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 27 Nov 2023 21:01:53 +0000 (21:01 +0000)
Chases: 18bafbfc57039e16d1dabd78b882b3d6477f76b5
xcursor-manager: drop wlr_xcursor_manager_set_cursor_image()

src/input/cursor.c
subprojects/wlroots.wrap

index 4764f2ea62c514c60d4cb0cd447fc24b337e38ba..0c0131054438cb38311b014b244bd393149e5f4a 100644 (file)
@@ -252,8 +252,8 @@ cursor_set(struct seat *seat, enum lab_cursors cursor)
                return;
        }
 
-       wlr_xcursor_manager_set_cursor_image(
-               seat->xcursor_manager, cursor_names[cursor], seat->cursor);
+       wlr_cursor_set_xcursor(seat->cursor, seat->xcursor_manager,
+               cursor_names[cursor]);
        seat->server_cursor = cursor;
 }
 
@@ -274,8 +274,15 @@ cursor_update_image(struct seat *seat)
                }
                return;
        }
-       wlr_xcursor_manager_set_cursor_image(
-               seat->xcursor_manager, cursor_names[cursor], seat->cursor);
+       /*
+        * Call wlr_cursor_unset_image() first to force wlroots to
+        * update the cursor (e.g. for a new output). Otherwise,
+        * wlr_cursor_set_xcursor() may detect that we are setting the
+        * same cursor as before, and do nothing.
+        */
+       wlr_cursor_unset_image(seat->cursor);
+       wlr_cursor_set_xcursor(seat->cursor, seat->xcursor_manager,
+               cursor_names[cursor]);
 }
 
 bool
index 3c4b3c09e827ba635b86fbf52a6ffb7bd5ecb237..d1369b8172375b8042f96c55aeda6b4deb479656 100644 (file)
@@ -1,6 +1,6 @@
 [wrap-git]
 url = https://gitlab.freedesktop.org/wlroots/wlroots.git
-revision = 70c1a5724814d2f786f7d3a0e55a05f11af14029
+revision = 18bafbfc57039e16d1dabd78b882b3d6477f76b5
 
 [provide]
 dependency_names = wlroots