summaryrefslogtreecommitdiff
path: root/sway/server.c
diff options
context:
space:
mode:
authorDaniel Eklöf <[email protected]>2019-06-01 21:05:09 +0200
committerDrew DeVault <[email protected]>2019-06-05 11:00:10 -0400
commit190546fd315a24c04006fb1b177069933f4350da (patch)
treedb0910b4931625d259f14b22a56b54095a8466bd /sway/server.c
parent799f5a2cd5ffa83d73816489aa8683564bc226f7 (diff)
add seat sub command 'xcursor_theme'
New 'seat <name> xcursor_theme <theme> [<size>]' command that configures the default xcursor theme. The default seat's xcursor theme is also propagated to XWayland, and exported through the XCURSOR_THEME and XCURSOR_SIZE environment variables. This is done every time the default seat's configuration is changed.
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) {
}
bool server_start(struct sway_server *server) {
- // TODO: configurable cursor theme and size
- int cursor_size = 24;
- const char *cursor_theme = NULL;
-
- char cursor_size_fmt[16];
- snprintf(cursor_size_fmt, sizeof(cursor_size_fmt), "%d", cursor_size);
- setenv("XCURSOR_SIZE", cursor_size_fmt, 1);
- if (cursor_theme != NULL) {
- setenv("XCURSOR_THEME", cursor_theme, 1);
- }
-
#if HAVE_XWAYLAND
if (config->xwayland) {
sway_log(SWAY_DEBUG, "Initializing Xwayland");
@@ -193,17 +182,7 @@ bool server_start(struct sway_server *server) {
setenv("DISPLAY", server->xwayland.wlr_xwayland->display_name, true);
- server->xwayland.xcursor_manager =
- wlr_xcursor_manager_create(cursor_theme, cursor_size);
- wlr_xcursor_manager_load(server->xwayland.xcursor_manager, 1);
- struct wlr_xcursor *xcursor = wlr_xcursor_manager_get_xcursor(
- server->xwayland.xcursor_manager, "left_ptr", 1);
- if (xcursor != NULL) {
- struct wlr_xcursor_image *image = xcursor->images[0];
- wlr_xwayland_set_cursor(server->xwayland.wlr_xwayland, image->buffer,
- image->width * 4, image->width, image->height, image->hotspot_x,
- image->hotspot_y);
- }
+ /* xcursor configured by the default seat */
}
#endif