diff options
author | emersion <contact@emersion.fr> | 2018-08-10 18:53:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-10 18:53:18 +0100 |
commit | e474d87e42d625eb4e0a41a0559bbf0e4ec5ecc5 (patch) | |
tree | 243a36bc46002e6b4392ea512801047a084ec5e5 /swaynag/swaynag.c | |
parent | Merge pull request #2446 from emersion/xwayland-unmanaged-order (diff) | |
parent | swaynag: destroy old cursor theme when updated (diff) | |
download | sway-e474d87e42d625eb4e0a41a0559bbf0e4ec5ecc5.tar.gz sway-e474d87e42d625eb4e0a41a0559bbf0e4ec5ecc5.tar.zst sway-e474d87e42d625eb4e0a41a0559bbf0e4ec5ecc5.zip |
Merge pull request #2447 from ianyfan/swaynag-leak
Fix memory leak in swaynag
Diffstat (limited to 'swaynag/swaynag.c')
-rw-r--r-- | swaynag/swaynag.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c index 3764071e..26d3589e 100644 --- a/swaynag/swaynag.c +++ b/swaynag/swaynag.c | |||
@@ -110,6 +110,9 @@ static struct wl_surface_listener surface_listener = { | |||
110 | 110 | ||
111 | static void update_cursor(struct swaynag *swaynag) { | 111 | static void update_cursor(struct swaynag *swaynag) { |
112 | struct swaynag_pointer *pointer = &swaynag->pointer; | 112 | struct swaynag_pointer *pointer = &swaynag->pointer; |
113 | if (swaynag->pointer.cursor_theme) { | ||
114 | wl_cursor_theme_destroy(swaynag->pointer.cursor_theme); | ||
115 | } | ||
113 | pointer->cursor_theme = wl_cursor_theme_load(NULL, 24 * swaynag->scale, | 116 | pointer->cursor_theme = wl_cursor_theme_load(NULL, 24 * swaynag->scale, |
114 | swaynag->shm); | 117 | swaynag->shm); |
115 | struct wl_cursor *cursor = | 118 | struct wl_cursor *cursor = |