Commit Graph

7 Commits

Author SHA1 Message Date
Uli Schlachter 01bd2d1896 selection_acquire: Change the API to a table
As requested in the review, instead of just having a single string
argument, selection_acquire() now has a table as its argument. It
searches the string under the "selection" key here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-17 08:00:57 +01:00
Uli Schlachter b979fb724a Start a selection transfer object
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:21:43 +01:00
Uli Schlachter 0f948d0dd9 Begin implementing selection transfers
This commit adds an implementation that always answers "Test\n" when
asked for the selection contents.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:01:37 +01:00
Uli Schlachter 869b1b0dff selection_acquire: Also emit release when X11 selection is lost
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:01:21 +01:00
Uli Schlachter e4199dd6b5 Add a :release() method to selection acquire objects
This allows to voluntarily give up ownership of a selection. Because
selection acquire objects cannot be garbage-collected before they are
released, this also gets rid of the function destroying the window when
its selection acquire object is destroyed. Instead, the window is
immediately destroyed when no longer needed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:01:21 +01:00
Uli Schlachter 967c9f7a01 Add selection_acquire objects
It is now possible to construct such objects and they already own a
selection.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:01:21 +01:00
Uli Schlachter 94d413345a Prepare a selection acquiring interface
No run-time behaviour is changed so far.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:01:21 +01:00