summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xwayland/selection.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/xwayland/selection.c b/xwayland/selection.c
index 3fcd5788..6f5328d2 100644
--- a/xwayland/selection.c
+++ b/xwayland/selection.c
@@ -655,8 +655,6 @@ weston_wm_set_selection(struct wl_listener *listener, void *data)
struct weston_wm *wm =
container_of(listener, struct weston_wm, selection_listener);
struct weston_data_source *source = seat->selection_data_source;
- const char **p, **end;
- int has_text_plain = 0;
if (source == NULL) {
if (wm->selection_owner == wm->selection_window)
@@ -670,28 +668,10 @@ weston_wm_set_selection(struct wl_listener *listener, void *data)
if (source->send == data_source_send)
return;
- p = source->mime_types.data;
- end = (const char **)
- ((char *) source->mime_types.data + source->mime_types.size);
- while (p < end) {
- weston_log(" %s\n", *p);
- if (strcmp(*p, "text/plain") == 0 ||
- strcmp(*p, "text/plain;charset=utf-8") == 0)
- has_text_plain = 1;
- p++;
- }
-
- if (has_text_plain) {
- xcb_set_selection_owner(wm->conn,
- wm->selection_window,
- wm->atom.clipboard,
- XCB_TIME_CURRENT_TIME);
- } else {
- xcb_set_selection_owner(wm->conn,
- XCB_ATOM_NONE,
- wm->atom.clipboard,
- XCB_TIME_CURRENT_TIME);
- }
+ xcb_set_selection_owner(wm->conn,
+ wm->selection_window,
+ wm->atom.clipboard,
+ XCB_TIME_CURRENT_TIME);
}
void