mutter/src/wayland
Jonas Ådahl 5547c98f97 wayland: Make MetaWaylandDataSource ownership protocol specific
Firstly, this patch makes MetawaylandDataSource a GObject. This is in
order to easier track its lifetime without adding destroy signals etc. It
also makes the vfunc table GObject class functions instead while at it,
as well as moves protocol specific part of the source into their own
implementations.

An important part of this patch is the change of ownership. Prior to this
patch, MetaWaylandDataDevice would kind of own the source, but for
Wayland sources it would remove it if the corresponding wl_resource was
destroyed. For XWayland clients it would own it completely, and only
remove it if the source was replaced.

This patch changes so that the protocol implementation owns the source.
For Wayland sources, the wl_resource owns the source, and the
MetaWaylandDataDevice sets a weak reference (so in other words, no
semantical changes really). For XWayland sources, the source is owned by
the selection bridge, and not removed until replaced or if the client
goes away.

Given the changes in ownership, data offers may now properly track the
lifetime of a source it represents. Prior to this patch, if an offer with
an XWayland source would loose its source, it wouldn't get notified and
have an invalid pointer it would potentally crash on. For Wayland
sources, an offer would have a weak reference and clean itself up if the
source went away. This patch changes so the behavior is consistent,
meaning a weak reference is added to the source GObject so that the offer
can behave correctly both for Wayland sources and XWayland sources.

https://bugzilla.gnome.org/show_bug.cgi?id=750680
2015-06-30 11:23:40 +08:00
..
protocol wayland: Add and implement set/unset_modal for the gtk_surface interface 2015-04-23 16:02:37 +08:00
meta-wayland-buffer.c wayland: Seal SHM buffers before access 2015-01-09 16:39:37 -08:00
meta-wayland-buffer.h wayland: Move some buffer manipulation functions to meta-wayland-buffer 2014-10-07 20:42:27 -07:00
meta-wayland-data-device-private.h wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-wayland-data-device.c wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-wayland-data-device.h wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-wayland-keyboard.c wayland-keyboard: Disconnect from backend signals on release 2015-04-02 23:21:22 +02:00
meta-wayland-keyboard.h wayland-keyboard: Send modifiers after the key event 2014-10-10 18:12:23 +02:00
meta-wayland-outputs.c wayland: use monitors info for outputs instead of kms outputs 2015-06-01 09:38:13 -07:00
meta-wayland-outputs.h wayland: Split outputs to another file 2014-04-22 18:25:34 -04:00
meta-wayland-pointer.c wayland: do not generate motion events 2015-06-12 11:14:21 -04:00
meta-wayland-pointer.h wayland: Fail clients who try to create or destroy a not-top-most popup 2015-02-17 22:14:47 +08:00
meta-wayland-popup.c wayland: Fail clients who try to create or destroy a not-top-most popup 2015-02-17 22:14:47 +08:00
meta-wayland-popup.h wayland: Fail clients who try to create or destroy a not-top-most popup 2015-02-17 22:14:47 +08:00
meta-wayland-private.h wayland: Add X11/wayland selection interoperation 2015-05-15 17:43:53 +02:00
meta-wayland-region.c wayland: Make the MetaWaylandRegion type opaque 2014-10-07 20:44:19 -07:00
meta-wayland-region.h wayland: Make the MetaWaylandRegion type opaque 2014-10-07 20:44:19 -07:00
meta-wayland-seat.c wayland: don't try to use seat devices that aren't (yet) present 2015-02-18 11:52:13 -05:00
meta-wayland-seat.h wayland: Handle window drags for touch events 2014-07-24 18:05:56 +02:00
meta-wayland-surface.c wayland: Ensure we queue a "calc showing" operation after we get a buffer 2015-06-16 20:35:00 +02:00
meta-wayland-surface.h wayland: Refactor DnD target functions into MetaWaylandDragDestFuncs 2015-05-29 11:27:52 +02:00
meta-wayland-touch.c configure: Conditionalize libinput and gbm too 2014-08-27 09:57:43 -04:00
meta-wayland-touch.h wayland: Handle window drags for touch events 2014-07-24 18:05:56 +02:00
meta-wayland-types.h wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-wayland-versions.h wayland: Add and implement set/unset_modal for the gtk_surface interface 2015-04-23 16:02:37 +08:00
meta-wayland.c wayland: Destroy pending frame callbacks when destroying a surface 2015-03-05 17:07:32 +01:00
meta-wayland.h wayland: Destroy pending frame callbacks when destroying a surface 2015-03-05 17:07:32 +01:00
meta-window-wayland.c window-wayland.[ch] => meta-window-wayland.[ch] 2015-04-27 18:09:16 -07:00
meta-window-wayland.h window-wayland.[ch] => meta-window-wayland.[ch] 2015-04-27 18:09:16 -07:00
meta-xwayland-private.h xwayland: Implement wayland-to-X11 DnD 2015-05-29 11:27:53 +02:00
meta-xwayland-selection-private.h wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-xwayland-selection.c wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-xwayland.c wayland: Add X11/wayland selection interoperation 2015-05-15 17:43:53 +02:00
meta-xwayland.h xwayland: Switch to the new Xwayland DDX 2014-04-02 13:24:57 -04:00