Merge pull request #2447 from ianyfan/swaynag-leak

Fix memory leak in swaynag
This commit is contained in:
emersion 2018-08-10 18:53:18 +01:00 committed by GitHub
commit e474d87e42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,6 +110,9 @@ static struct wl_surface_listener surface_listener = {
static void update_cursor(struct swaynag *swaynag) { static void update_cursor(struct swaynag *swaynag) {
struct swaynag_pointer *pointer = &swaynag->pointer; struct swaynag_pointer *pointer = &swaynag->pointer;
if (swaynag->pointer.cursor_theme) {
wl_cursor_theme_destroy(swaynag->pointer.cursor_theme);
}
pointer->cursor_theme = wl_cursor_theme_load(NULL, 24 * swaynag->scale, pointer->cursor_theme = wl_cursor_theme_load(NULL, 24 * swaynag->scale,
swaynag->shm); swaynag->shm);
struct wl_cursor *cursor = struct wl_cursor *cursor =