aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-09 14:06:00 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-09 14:06:00 -0500
commit9333a7eb5329073aecfaf776c8ee0572c7dff67c (patch)
tree1438a16a31d2df9ec035e856fd4c89abe6c34e38 /sway/input/seat.c
parentsway xcursor manager (diff)
downloadsway-9333a7eb5329073aecfaf776c8ee0572c7dff67c.tar.gz
sway-9333a7eb5329073aecfaf776c8ee0572c7dff67c.tar.zst
sway-9333a7eb5329073aecfaf776c8ee0572c7dff67c.zip
working xcursor
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 1fd65980..5aed1f68 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -83,15 +83,13 @@ void sway_seat_configure_xcursor(struct sway_seat *seat) {
83 // TODO configure theme and size 83 // TODO configure theme and size
84 const char *cursor_theme = "default"; 84 const char *cursor_theme = "default";
85 85
86 if (seat->cursor->xcursor_manager) { 86 if (!seat->cursor->xcursor_manager) {
87 wlr_xcursor_manager_destroy(seat->cursor->xcursor_manager); 87 seat->cursor->xcursor_manager =
88 } 88 wlr_xcursor_manager_create("default", 24);
89 89 if (sway_assert(seat->cursor->xcursor_manager,
90 seat->cursor->xcursor_manager = 90 "Cannot create XCursor manager for theme %s", cursor_theme)) {
91 wlr_xcursor_manager_create(NULL, 24); 91 return;
92 if (sway_assert(seat->cursor->xcursor_manager, 92 }
93 "Cannot create XCursor manager for theme %s", cursor_theme)) {
94 return;
95 } 93 }
96 94
97 for (int i = 0; i < root_container.children->length; ++i) { 95 for (int i = 0; i < root_container.children->length; ++i) {
@@ -102,7 +100,7 @@ void sway_seat_configure_xcursor(struct sway_seat *seat) {
102 wlr_xcursor_manager_load(seat->cursor->xcursor_manager, 100 wlr_xcursor_manager_load(seat->cursor->xcursor_manager,
103 output->scale); 101 output->scale);
104 102
105 sway_assert(result, 103 sway_assert(!result,
106 "Cannot load xcursor theme for output '%s' with scale %d", 104 "Cannot load xcursor theme for output '%s' with scale %d",
107 output->name, output->scale); 105 output->name, output->scale);
108 } 106 }