x11: Clear X11 selection source after unsetting owner
The X11 selection source was being preserved after unsetting its ownership. This is no leak as it would be eventually replaced by another source, or destroyed on finalize. But it's pointless to keep it. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1206 (cherry picked from commit 94b3c334e5a141f68911c6e69fa2dab49ff260b7)
This commit is contained in:
parent
0ab8b17433
commit
8acff5309d
@ -338,6 +338,7 @@ meta_x11_selection_handle_xfixes_selection_notify (MetaX11Display *x11_display,
|
|||||||
/* An X client went away, clear the selection */
|
/* An X client went away, clear the selection */
|
||||||
meta_selection_unset_owner (selection, selection_type,
|
meta_selection_unset_owner (selection, selection_type,
|
||||||
x11_display->selection.owners[selection_type]);
|
x11_display->selection.owners[selection_type]);
|
||||||
|
g_clear_object (&x11_display->selection.owners[selection_type]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event->owner != x11_display->selection.xwindow)
|
else if (event->owner != x11_display->selection.xwindow)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user