const x11 = @import("x11.zig"); const Atom = x11.Atom; const Display = x11.Display; const False = x11.False; const Window = x11.Window; const getAtom = x11.getAtom; const xfixes = @cImport({ @cInclude("X11/extensions/Xfixes.h"); }); const SET_SELECTION_OWNER = xfixes.XFixesSetSelectionOwnerNotifyMask; extern fn XFixesSelectSelectionInput(display: *Display, window: Window, selection: Atom, event_mask: c_ulong) void; pub fn getSelection(display: *Display, window: Window, selection: [*c]const u8) void { const atom = getAtom(display, selection, False); XFixesSelectSelectionInput(display, window, atom, SET_SELECTION_OWNER); }