Commit Graph

5 Commits

Author SHA1 Message Date
Simon Ser ca45f4490c Remove all wayland-server.h includes
The documentation for wayland-server.h says:

> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.

Replacing wayland-server.h with wayland-server-core.h allows us to drop the
WL_HIDE_DEPRECATED declaration.
2019-07-27 15:49:32 -04:00
Ivan Molodetskikh 9e49ceb129 data-control: add primary selection support
data-control: separate out a data_offer struct

This is a prerequisite to adding primary selection support.

data-control: separate out data_control_source

This is a prerequisite to adding primary selection support, since that
doesn't use wlr_data_source, but rather wlr_primary_selection_source.

Update the data-control protocol

data-control: add primary selection support

Merge create_offer and create_primary_offer

Extract code into data_control_source_destroy()

Fix pointer style

Move resource neutralization to destructor

Store wl_resource in the data_offer

Extract data_offer destruction into a function
2019-02-10 17:12:05 +01:00
emersion 4cb0697e57 data-device, primary-selection: add request_set_selection
This makes compositors able to block and/or customize set_selection requests
coming from clients. For instance, it's possible for a compositor to disable
rich selection content (by removing all MIME types except text/plain). This
commit implements the design proposed in [1].

Two new events are added to wlr_seat: request_set_selection and
request_set_primary_selection. Compositors need to listen to these events and
either destroy the source or effectively set the selection.

Fixes https://github.com/swaywm/wlroots/issues/1138

[1]: https://github.com/swaywm/wlroots/issues/1367#issuecomment-442403454
2019-01-24 11:38:23 +01:00
emersion 69e7fd61b7
data-control-v1: update to latest protocol proposal 2018-12-30 02:52:03 +01:00
emersion 99d879c887
data-control-v1: initial protocol implementation 2018-12-30 02:48:03 +01:00