From 3be5791fb2d7adecfa9969646904eba293e45772 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 24 Dec 2016 14:12:54 +0100 Subject: [PATCH] Use clipboard atom instead of XCB_ATOM_SECONDARY for pasting. Should fix issue: #516 --- include/x11-helper.h | 1 + source/view.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/x11-helper.h b/include/x11-helper.h index 80a32689..e950fdc7 100644 --- a/include/x11-helper.h +++ b/include/x11-helper.h @@ -44,6 +44,7 @@ void window_set_atom_prop ( xcb_window_t w, xcb_atom_t prop, xcb_atom_t *atoms, X ( I3_SOCKET_PATH ), \ X ( UTF8_STRING ), \ X ( STRING ), \ + X ( CLIPBOARD ), \ X ( WM_WINDOW_ROLE ), \ X ( _XROOTPMAP_ID ), \ X ( _MOTIF_WM_HINTS ), \ diff --git a/source/view.c b/source/view.c index dde0be96..ca30c2b0 100644 --- a/source/view.c +++ b/source/view.c @@ -999,7 +999,7 @@ gboolean rofi_view_trigger_action ( RofiViewState *state, KeyBindingAction actio xcb_flush ( xcb->connection ); break; case PASTE_SECONDARY: - xcb_convert_selection ( xcb->connection, CacheState.main_window, XCB_ATOM_SECONDARY, + xcb_convert_selection ( xcb->connection, CacheState.main_window, netatoms[CLIPBOARD], xcb->ewmh.UTF8_STRING, xcb->ewmh.UTF8_STRING, XCB_CURRENT_TIME ); xcb_flush ( xcb->connection ); break;