Commit Graph

12 Commits

Author SHA1 Message Date
Carlos Garnacho
69d9746708 wayland: write wl_data_offer data asynchronously
Currently writing wl_data_offer data into the fd is 1) synchronous, which
is noticeable when transferring large amounts of data, and 2) buggy, write()
error checking is done on the accumulator, breaking both the written data
accounting and error checking itself.

Fix both by making writes asynchonous through GOutputStream, the operation
is spun off and either finished, or cancelled if new data is stored in the
selection while the transfer is active.
2014-10-10 20:58:55 +02:00
Matthias Clasen
52578945bd Wayland: Fix various compiler warnings
Mostly missing declarations, missing statics and unused functions.
2014-09-05 20:41:06 -04:00
Carlos Garnacho
7b85a3417a wayland: Implement drag sources
The wl_data_source is retrieved from the selection object for the DnD
selection, and used to initiate a drag. When the drag is finished, a
button release or touch end event is synthesized to finish the DnD
operation after the compositor grab is gone.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:53 +02:00
Carlos Garnacho
f48b3cce02 wayland: Replace clipboard implementation
The wayland specific clipboard functions have been replaced by something
more similar to the hooking the win32 backend does, which allows for just
using the default GtkClipboard code in GTK+. As a consequence, the
wayland-specific GtkClipboard implementation is now gone.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:53 +02:00
Carlos Garnacho
7744799072 wayland: Implement drag/source side of selections
This has been made to work similarly to X11, requests for the data device
contents are notified through GDK_SELECTION_REQUEST events, the data stored
in the GDK_SELECTION property as a reaction to that event is then stored
into the wayland selection implementation, and written to the fd when
requested/available.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:53 +02:00
Carlos Garnacho
3b953041a9 wayland: Implement drop/destination side of selections
This implementation makes the destination side of selections work
similarly to X11's, gdk_selection_convert() triggers data fetching,
which is notified through GDK_SELECTION_NOTIFY events on arrival,
the buffered data is then available through gdk_selection_property_get().

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:53 +02:00
Carlos Garnacho
32bf03c053 wayland: implement text_property_to_utf8_list()
Of some sort, this is enough to get text transfers on wayland, anything but
utf8 as plain/text should be pretty rare.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:53 +02:00
Rob Bradford
2928ffc7b1 wayland: Remove unhelpful debug message 2012-07-12 15:58:37 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Kristian Høgsberg
1b918d1b93 wayland: Pretend selection works, print debug message 2011-02-10 10:54:10 -05:00
Kristian Høgsberg
541d5172dd Track 2.99.3 API changes 2011-02-08 08:12:59 -05:00
Kristian Høgsberg
590f3dfa1f Add Wayland backend 2011-02-05 16:11:54 -05:00