Commit Graph

7 Commits

Author SHA1 Message Date
Uli Schlachter 6d7014ca68 Selection transfer: Change event mask after append
When a selection transfer is done, we are no longer interested in events
from the selection window. However, this happens after we set the
property to indicate end of transfer, not before.

The (untested) theory here is that this should make selection transfers
from AwesomeWM to AwesomeWM, i.e. internal transfers, work.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:21:50 +01:00
Uli Schlachter 18dd22811e Transfer objects: Accept data in chunks
This commit adds a "continue" signal on transfer objects. This signal is
used to request the next chunk of data from Lua after the last one was
sent.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:21:50 +01:00
Uli Schlachter 434f97e4b1 Selection transfer: Support INCR transfers
Large amounts of data have to be send in chunks via the INCR protocol.
This commit adds support for that protocol to selection transfers.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:21:50 +01:00
Uli Schlachter fe62ad5faa selection transfer: Support atom format
This commit makes :send{ data={"TARGETS", "UTF8_STRING"}, format="atom"}
work correctly. This was tested with xclip -o -target TARGETS.

With this commit, it becomes possible to implement the TARGETS target.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:21:50 +01:00
Uli Schlachter a4bac0683e Add a :send method to selection transfers
This makes the following work on a selection acquire object:

    o:connect_signal("request", function(_, _, t)
        t:send{ data = "Hello World!\n" }
    end)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:21:50 +01:00
Uli Schlachter 53db43c2b2 Emit a "request" signal on selection acquire objects
This now creates a selection transfer object and requests Lua to reply
to the request via this object. However, so far no answer is possible.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-11 09:21:50 +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