diff options
author | Aidan Harris <mail@aidanharris.io> | 2019-06-08 14:28:10 +0000 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-06-08 17:28:10 +0300 |
commit | f17eae9043ec2d74b7b7ee6815ef024a7ba3ce77 (patch) | |
tree | 2d0612fb005f06346a42427db57004007e1c39f4 | |
parent | Add the missing constant for the switch input type (diff) | |
download | sway-f17eae9043ec2d74b7b7ee6815ef024a7ba3ce77.tar.gz sway-f17eae9043ec2d74b7b7ee6815ef024a7ba3ce77.tar.zst sway-f17eae9043ec2d74b7b7ee6815ef024a7ba3ce77.zip |
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.
-rw-r--r-- | sway/input/seat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 2e386d2c..e6b53736 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -751,10 +751,10 @@ void seat_configure_xcursor(struct sway_seat *seat) { | |||
751 | } | 751 | } |
752 | 752 | ||
753 | #if HAVE_XWAYLAND | 753 | #if HAVE_XWAYLAND |
754 | if (!server.xwayland.xcursor_manager || | 754 | if (config->xwayland && (!server.xwayland.xcursor_manager || |
755 | !xcursor_manager_is_named(server.xwayland.xcursor_manager, | 755 | !xcursor_manager_is_named(server.xwayland.xcursor_manager, |
756 | cursor_theme) || | 756 | cursor_theme) || |
757 | server.xwayland.xcursor_manager->size != cursor_size) { | 757 | server.xwayland.xcursor_manager->size != cursor_size)) { |
758 | 758 | ||
759 | wlr_xcursor_manager_destroy(server.xwayland.xcursor_manager); | 759 | wlr_xcursor_manager_destroy(server.xwayland.xcursor_manager); |
760 | 760 | ||