Druid: X11 shell does not support clipboards.

Created on 15 May 2020  路  1Comment  路  Source: linebender/druid

help wanted missing shelx11

Most helpful comment

The relevant standard here is ICCCM. I recently-ish had the joy of implementing support for this. Since this X11, of course you need to create windows. Read the sections of ICCCM about selections.

The general process (for getting the selection) is that you send a ConvertSelection request and some time later receive a SelectionNotify event. Large data transfers then additionally involve some dance with window properties. This is called INCR and described in ICCCM.

For setting a selection, you create a window and make it the selection owner with SetSelectionOwner. Then you have to react to SelectionRequest events. SelectionClear tells you when something else became the selection owner.

The relevant selections are CLIPBOARD. Perhaps you also want to handle the PRIMARY selection. This is the currently selected text. Most (?) programs support pasting this via the middle mouse button.

>All comments

The relevant standard here is ICCCM. I recently-ish had the joy of implementing support for this. Since this X11, of course you need to create windows. Read the sections of ICCCM about selections.

The general process (for getting the selection) is that you send a ConvertSelection request and some time later receive a SelectionNotify event. Large data transfers then additionally involve some dance with window properties. This is called INCR and described in ICCCM.

For setting a selection, you create a window and make it the selection owner with SetSelectionOwner. Then you have to react to SelectionRequest events. SelectionClear tells you when something else became the selection owner.

The relevant selections are CLIPBOARD. Perhaps you also want to handle the PRIMARY selection. This is the currently selected text. Most (?) programs support pasting this via the middle mouse button.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timothyhollabaugh picture timothyhollabaugh  路  3Comments

MGlolenstine picture MGlolenstine  路  3Comments

chris-zen picture chris-zen  路  6Comments

thePalindrome picture thePalindrome  路  3Comments

insignification picture insignification  路  5Comments