aboutsummaryrefslogtreecommitdiff
path: root/xwayland/selection/selection.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-12-02 13:16:50 -0500
committerGitHub <noreply@github.com>2018-12-02 13:16:50 -0500
commit8887508fed89d59486a4abcff7a2071326ca8207 (patch)
tree169bfbf09bf0d533da13f4965b896cb1a97dc86b /xwayland/selection/selection.c
parent3f5f4cec88868818105bdc297f89d51fa378d99d (diff)
parent9f0720c03abcc600b6156b52e367d7cafcf57644 (diff)
Merge pull request #1397 from emersion/refactor-primary-selection
gtk-primary-selection: refactor everything, untie from seat
Diffstat (limited to 'xwayland/selection/selection.c')
-rw-r--r--xwayland/selection/selection.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/xwayland/selection/selection.c b/xwayland/selection/selection.c
index a29eeeae..4d7732cb 100644
--- a/xwayland/selection/selection.c
+++ b/xwayland/selection/selection.c
@@ -5,11 +5,11 @@
#include <string.h>
#include <unistd.h>
#include <wlr/types/wlr_data_device.h>
-#include <wlr/types/wlr_gtk_primary_selection.h>
+#include <wlr/types/wlr_primary_selection.h>
#include <wlr/util/log.h>
#include <xcb/xfixes.h>
-#include "xwayland/xwm.h"
#include "xwayland/selection.h"
+#include "xwayland/xwm.h"
void xwm_selection_transfer_remove_source(
struct wlr_xwm_selection_transfer *transfer) {
@@ -231,8 +231,7 @@ void xwm_selection_finish(struct wlr_xwm *xwm) {
if (xwm->seat->primary_selection_source &&
primary_selection_source_is_xwayland(
xwm->seat->primary_selection_source)) {
- wlr_seat_set_gtk_primary_selection(xwm->seat, NULL,
- wl_display_next_serial(xwm->xwayland->wl_display));
+ wlr_seat_set_primary_selection(xwm->seat, NULL);
}
wlr_xwayland_set_seat(xwm->xwayland, NULL);
}
@@ -274,11 +273,10 @@ static void seat_handle_primary_selection(struct wl_listener *listener,
struct wlr_seat *seat = data;
struct wlr_xwm *xwm =
wl_container_of(listener, xwm, seat_primary_selection);
- struct wlr_gtk_primary_selection_source *source = seat->primary_selection_source;
+ struct wlr_primary_selection_source *source =
+ seat->primary_selection_source;
- if (source != NULL &&
- primary_selection_source_is_xwayland(
- source)) {
+ if (source != NULL && primary_selection_source_is_xwayland(source)) {
return;
}