aboutsummaryrefslogtreecommitdiffstats
path: root/sway/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/server.c')
-rw-r--r--sway/server.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/sway/server.c b/sway/server.c
index a403d8b3..b50e3ccc 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -168,17 +168,6 @@ void server_fini(struct sway_server *server) {
168} 168}
169 169
170bool server_start(struct sway_server *server) { 170bool server_start(struct sway_server *server) {
171 // TODO: configurable cursor theme and size
172 int cursor_size = 24;
173 const char *cursor_theme = NULL;
174
175 char cursor_size_fmt[16];
176 snprintf(cursor_size_fmt, sizeof(cursor_size_fmt), "%d", cursor_size);
177 setenv("XCURSOR_SIZE", cursor_size_fmt, 1);
178 if (cursor_theme != NULL) {
179 setenv("XCURSOR_THEME", cursor_theme, 1);
180 }
181
182#if HAVE_XWAYLAND 171#if HAVE_XWAYLAND
183 if (config->xwayland) { 172 if (config->xwayland) {
184 sway_log(SWAY_DEBUG, "Initializing Xwayland"); 173 sway_log(SWAY_DEBUG, "Initializing Xwayland");
@@ -193,17 +182,7 @@ bool server_start(struct sway_server *server) {
193 182
194 setenv("DISPLAY", server->xwayland.wlr_xwayland->display_name, true); 183 setenv("DISPLAY", server->xwayland.wlr_xwayland->display_name, true);
195 184
196 server->xwayland.xcursor_manager = 185 /* xcursor configured by the default seat */
197 wlr_xcursor_manager_create(cursor_theme, cursor_size);
198 wlr_xcursor_manager_load(server->xwayland.xcursor_manager, 1);
199 struct wlr_xcursor *xcursor = wlr_xcursor_manager_get_xcursor(
200 server->xwayland.xcursor_manager, "left_ptr", 1);
201 if (xcursor != NULL) {
202 struct wlr_xcursor_image *image = xcursor->images[0];
203 wlr_xwayland_set_cursor(server->xwayland.wlr_xwayland, image->buffer,
204 image->width * 4, image->width, image->height, image->hotspot_x,
205 image->hotspot_y);
206 }
207 } 186 }
208#endif 187#endif
209 188