mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
primary-selection: introduce wlr_primary_selection_source
This is a common interface that can be used for all primary selection protocols, as discussed in [1]. A new function wlr_seat_set_primary_selection is added to set the primary selection for all protocols. The seat now owns again the source, and resets the selection to NULL when destroyed. [1]: https://github.com/swaywm/wlroots/issues/1367#issuecomment-442403454
This commit is contained in:
parent
658b590567
commit
9f0720c03a
15 changed files with 209 additions and 209 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <wayland-server.h>
|
||||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_primary_selection.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "types/wlr_seat.h"
|
||||
|
|
@ -162,6 +163,8 @@ void wlr_seat_destroy(struct wlr_seat *seat) {
|
|||
seat->selection_source = NULL;
|
||||
}
|
||||
|
||||
wlr_seat_set_primary_selection(seat, NULL);
|
||||
|
||||
struct wlr_seat_client *client, *tmp;
|
||||
wl_list_for_each_safe(client, tmp, &seat->clients, link) {
|
||||
struct wl_resource *resource, *next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue