Commit Graph

15 Commits

Author SHA1 Message Date
Benjamin Otte
d7266b25ba Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
Mohammed Sadiq
1ce960c85b gdkselectioninputstream-x11: Fix memory leak 2018-09-16 20:08:25 +05:30
Alexander Larsson
890080ebf7 GdkWindow -> GdkSurface: File renames
Rename all *window.[ch] source files.

This is an automatic operation, done by the following commands:

for i in $(git ls-files gdk | grep window); do
    git mv $i $(echo $i | sed s/window/surface/);
    git sed -f g $(basename $i) $(basename $i | sed s/window/surface/) ;
done

git checkout NEWS* po-properties po
2018-03-20 11:46:11 +01:00
Timm Bäder
2f5d5ca9f8 GdkSelectionInputStreamX11: Plug a memory leak 2018-03-06 19:59:29 +01:00
Matthias Clasen
e151058dff Make gdk logging per-display
As far as possible, use per-display debug flags.

This will minimize the debug spew that we get from
the inspector if it is running on a separate display.
2018-01-14 17:05:04 -05:00
Benjamin Otte
fb0fdddd76 x11: Refactor xevent filtering some more
We now have a GdkX11Display::xevent signal that gets emitted for every
XEvent and allows you to interrupt processing via TRUE/FALSE return
values.
These return values to correspond to GDK_FILTER_REMOVE and
GDK_FILTER_CONTINUE respectively.

The GDK_FILTER_TRANSLATE case from gdk_window_add_filter() is now meant
to be handled via gdk_display_put_event().
2017-12-13 01:55:56 +01:00
Benjamin Otte
4b33a34ce3 x11: Use GdkX11Display::translate-event more 2017-12-13 01:09:32 +01:00
Benjamin Otte
134076e738 x11: Implement claiming the X Selection with the clipboard
... and of course support writing to other apps.
2017-12-03 05:46:47 +01:00
Benjamin Otte
9b78d76873 x11: Improve fallbacks for text
(1) Try all passed in formats in order if one of them fails.
(2) Don't blindly accept all formats, make sure they are mime types
(3) Add a bunch of special non-mime types that plug converters to
    get to mime types
2017-12-03 05:46:46 +01:00
Benjamin Otte
970cb100af x11: Improve debugging output for selection input stream 2017-12-03 05:46:27 +01:00
Benjamin Otte
41f70e18af clipboard: Refactor gdk_clipboard_read() to be async
This allows us not just to pass any mime type to the read function, but
it also makes it possible to pass multiple mime types and the clipboard
can then try them in order until it finds a supported one.

This is so far not implemented though.
2017-12-03 05:46:26 +01:00
Benjamin Otte
516f35b865 x11: Use async queue and implement sync reads on selections stream
Turns out, way too many async operations are implemented by running the
sync operation in a thread. The easiest solution is to support that is
to use a GAsyncQueue for the buffers and deadlock if called from the
main thread.
2017-12-03 05:43:24 +01:00
Benjamin Otte
13fb3fd4a0 x11: Implement INCR reads 2017-12-03 05:43:24 +01:00
Benjamin Otte
fe9045d82e x11: Various clipboard cleanups
(1) Turn X11 clipboard event handling into a regular filter function
(2) Maintain a timestamp in the clipboard, so we can pass it when
    querying selections.
2017-12-03 05:43:24 +01:00
Benjamin Otte
4728dd0a9e x11: Add an initial clipboard implementation
This does nothing but download the targets and debug-print them.
2017-12-03 05:43:24 +01:00