[mutter/wip/carlosg/x11-selection-timestamps: 1/2] x11: Clear X11 selection source after unsetting owner
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/x11-selection-timestamps: 1/2] x11: Clear X11 selection source after unsetting owner
- Date: Fri, 17 Apr 2020 12:31:40 +0000 (UTC)
commit 169cf2be34c60eb6029dbe32385ba40ed7d81a54
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Apr 17 14:13:50 2020 +0200
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.
src/x11/meta-x11-selection.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/x11/meta-x11-selection.c b/src/x11/meta-x11-selection.c
index 24a075b58..b2d524f35 100644
--- a/src/x11/meta-x11-selection.c
+++ b/src/x11/meta-x11-selection.c
@@ -339,6 +339,7 @@ meta_x11_selection_handle_xfixes_selection_notify (MetaX11Display *x11_display,
/* An X client went away, clear the selection */
meta_selection_unset_owner (selection, 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]