mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
core: Fix memory selection source leak after clipboard owner disappears
When an app disappears after some data from it has been copied to the clipboard, the owner of the clipboard selection becomes a new memory selection source. The initial reference this new selection source is never unref'ed, which leads to this being leaked on the next clipboard selection owner change. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1293
This commit is contained in:
parent
f712387325
commit
a031ac067e
@ -152,6 +152,7 @@ owner_changed_cb (MetaSelection *selection,
|
|||||||
display->saved_clipboard);
|
display->saved_clipboard);
|
||||||
g_set_object (&display->selection_source, new_owner);
|
g_set_object (&display->selection_source, new_owner);
|
||||||
meta_selection_set_owner (selection, selection_type, new_owner);
|
meta_selection_set_owner (selection, selection_type, new_owner);
|
||||||
|
g_object_unref (new_owner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user