commit f17eae9043ec2d74b7b7ee6815ef024a7ba3ce77
parent 9bfbb0dd49d4c473dfc5b3f89fb1469b416ea082
Author: Aidan Harris <mail@aidanharris.io>
Date: Sat, 8 Jun 2019 14:28:10 +0000
Fix segfault with "xwayland false" (#4228)
Commit 190546fd315a24c04006fb1b177069933f4350da failed to consider the
edge case where xwayland is disabled via the sway config. This leads to
a SEGFAULT when setting the xwayland cursor since the xwayland server is
not running.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sway/input/seat.c b/sway/input/seat.c
@@ -751,10 +751,10 @@ void seat_configure_xcursor(struct sway_seat *seat) {
}
#if HAVE_XWAYLAND
- if (!server.xwayland.xcursor_manager ||
+ if (config->xwayland && (!server.xwayland.xcursor_manager ||
!xcursor_manager_is_named(server.xwayland.xcursor_manager,
cursor_theme) ||
- server.xwayland.xcursor_manager->size != cursor_size) {
+ server.xwayland.xcursor_manager->size != cursor_size)) {
wlr_xcursor_manager_destroy(server.xwayland.xcursor_manager);