Commit Graph

8452 Commits

Author SHA1 Message Date
Matthias Clasen
bef8a3a0e9 Merge branch 'content-provider-autoptr' into 'master'
gdk: Add auto cleanup func for GdkContentProvider

See merge request GNOME/gtk!251
2018-07-19 18:04:24 +00:00
Ernestas Kulik
96d0368290 gdk: contentdeserializer: Fix deserializer not returning
file_uri_deserializer does not return on success, only on failure. This
commit fixes clipboard reads never finishing for some types.
2018-07-19 15:55:58 +03:00
Ernestas Kulik
9a0ec5b1e0 gdk: contentdeserializer: Fix stream usage
file_uri_deserializer splices a memory stream, as opposed to
string_deserializer, which uses a converter and filter stream. This
commit fixes erroneous use of GMemoryOutputStream as
GFilterOutputStream.
2018-07-19 15:53:08 +03:00
Ernestas Kulik
7b5a0a829a gdk: Add auto cleanup func for GdkContentProvider 2018-07-19 11:28:21 +03:00
Timm Bäder
446b2e25d3 Avoid a g_object_get path
We can use gdk_device_get_n_axes instead and will get the same result.
2018-07-17 17:33:46 +02:00
Matthias Clasen
bf5f27c6d5 Handle configure events in gdk
The previous attempt at removing configure events entirely
was causing some dialogs not to show up under Wayland.
Presumably due to ordering issues with emitting ::size-change
out of the backend.

Instead, keep configure events in the event queue, but handle
them on the gdk side. This keeps the ordering intact, while
still removing configure events from the api. The dialogs
show up now.
2018-07-15 20:23:45 -04:00
Matthias Clasen
7a1073c3ae Revert "gdk: Drop configure events"
This reverts commit a8926c9d87.
2018-07-15 20:23:45 -04:00
Matthias Clasen
e2fd33f78a Revert "broadway: Stop using configure events"
This reverts commit 9c827cbff4.
2018-07-15 20:23:45 -04:00
Matthias Clasen
3c8b3cbf41 win32: Stop accessing GdkDrag members 2018-07-15 16:58:22 -04:00
Matthias Clasen
410d4bca83 wayland: Set actions on drag
We should pass the actions to the newly created
drag in drag_begin.
2018-07-15 16:52:16 -04:00
Matthias Clasen
168523264c x11: Set actions on drag
We should pass the actions to the newly created
drag object in drag_begin.
2018-07-15 16:50:06 -04:00
Matthias Clasen
435f143e2e x11: Rename a file
Keep in line with the parent class.
2018-07-15 16:47:17 -04:00
Matthias Clasen
98ccb67277 drop: stop accessing GdkDrag fields 2018-07-15 16:43:28 -04:00
Matthias Clasen
2d83bb1b91 x11: Stop using GdkDrag fields 2018-07-15 16:43:28 -04:00
Matthias Clasen
298b6ee81a wayland: Stop accessing GdkDrag members 2018-07-15 16:43:28 -04:00
Matthias Clasen
5ce3520a2a Add a GdkDrag::surface property 2018-07-15 16:43:28 -04:00
Matthias Clasen
9cc3e2c8ef gdkdrag: remove an unused member
The drag surface is stored in the subclasses and obtained
by via the get_drag_surface vfunc.
2018-07-15 16:42:07 -04:00
Matthias Clasen
034f89b17f wayland: Drop an unused api
Nothing was calling gdk_wayland_drag_set_source_surface.
2018-07-15 16:42:07 -04:00
Matthias Clasen
1ea09a327a Add a private struct to GdkDrag
This will force subclasses to use proper api.
2018-07-15 16:42:00 -04:00
Matthias Clasen
bc2f484ae9 Revert "GdkDrop: drop the priv struct"
This reverts commit d927c3bee0.

I was wrong. Better to hide the struct fields from subclasses.
2018-07-15 15:58:05 -04:00
Matthias Clasen
228f813c43 dnd: Drop gdk_drag_drop
This is an inconsistently used private api, and just adds
a vfunc indirection for no other benefit.
2018-07-15 15:58:05 -04:00
Matthias Clasen
288086b899 Fix up some doc mishaps
When GdkWindow was renamed to GdkSurface, 'window managers'
turned into 'surface managers'. Thats not cool.
2018-07-15 15:36:19 -04:00
Matthias Clasen
d148f26658 Drop gdk_surface_withdraw
'withdrawn' is an X11-centric concept, and the function
can just as well be replaced by gdk_surface_hide.
2018-07-15 15:29:58 -04:00
Matthias Clasen
7ca6440f4d gdk: Drop map events
We are really inconsistent about generating these,
and they are not actually used in GTK+. Instead,
add a boolean GdkSurface::mapped property.
2018-07-15 15:10:56 -04:00
Matthias Clasen
1172810768 win32: Stop using expose and configure events
These no longer exist.
2018-07-15 14:07:40 -04:00
Matthias Clasen
9c827cbff4 broadway: Stop using configure events
These no longer exist.
2018-07-15 14:01:59 -04:00
Matthias Clasen
da3aaf39b9 gdk: Drop expose events
Replace expose events with a GdkSurface::expose signal.
This is part of the move to use events only for input.
2018-07-15 13:13:07 -04:00
Matthias Clasen
a8926c9d87 gdk: Drop configure events
Replace configure events with a GdkSurface::size-changed signal.
This is part of the move to use events only for input.
2018-07-15 11:51:09 -04:00
Benjamin Otte
6afb6bb9d2 x11: Set BackPixmap = None unconditionally
Makes it more obvious what we actually want.

Related: #1134
2018-07-14 05:27:54 +02:00
Benjamin Otte
1a5e60be7c paintable: Fix return_if_fail() statements
I always switch them up...
2018-07-13 14:56:04 +02:00
Matthias Clasen
00a61f92b6 docs: Small updates
Remove a few references to no-longer-existing APIs.
2018-07-13 10:13:00 +02:00
Matthias Clasen
f432c937cc dnd: Drop gdk_drag_abort
This function is never called, so drop it, its vfunc,
and all the backend implementations.
2018-07-12 13:57:45 +02:00
Matthias Clasen
1dd15b5237 dnd: Some documentation updates
Don't mention dnd protocols, and do mention the new,
split objects.
2018-07-12 13:57:45 +02:00
Matthias Clasen
5cdbbc6e61 win32: Build fixes 2018-07-12 13:02:42 +02:00
Matthias Clasen
0e2ac0ebf2 wayland: Rename a source file
Rename gdkdnd-wayland.c to gdkdrag-wayland.c to go along
with gdkdrop-wayland.c.
2018-07-12 13:02:42 +02:00
Matthias Clasen
c73cb2c154 wayland: Drop an unused field
Nothing was using the foreign_dnd_surface anymore, so no
need to create it in the first place.
2018-07-12 13:02:42 +02:00
Matthias Clasen
a756caa106 dnd: Drop suggested_action
The only user of this field was the x11 backend, and it
turns out that it does not need to store the value at all.
2018-07-12 13:02:42 +02:00
Matthias Clasen
da22ba3b86 drag: Split a setter
In preparation for moving the suggested action
to the x11 backend, split the setter off.
2018-07-12 13:02:42 +02:00
Matthias Clasen
7a0a92f2b6 win32: Stop using gdk_drag_get_suggested_action
The suggested action is not set or used in the win32
information, so don't put it in logs either.
2018-07-12 13:02:42 +02:00
Matthias Clasen
d927c3bee0 GdkDrop: drop the priv struct
Its not needed.
2018-07-12 13:02:42 +02:00
Matthias Clasen
59c2efbcd6 Add a GdkDrag::actions property
To go along the GdkDrop::actions property.
2018-07-12 13:02:42 +02:00
Matthias Clasen
94af080fb6 Rename a property
Change GdkDrag::action to GdkDrag::selected-action, which is
more clearly different from actions, and follows the existing
name of the struct field and getter.
2018-07-12 13:02:42 +02:00
Matthias Clasen
40841ec3be GdkDrag: Drop the priv struct
We don't need it.
2018-07-12 13:02:42 +02:00
Matthias Clasen
f69bb2fb2b wayland: set a cursor when starting a drag
Otherwise, we wont have one.
2018-07-12 13:02:42 +02:00
Matthias Clasen
db0b9f61ae dnd: Add a GdkDrag::action property
This lets us drop the ::action-changed signal for the
property change notification. But, can just as well move
the signal class handers which just update the cursor
to the ::action setter. No need to do this in the backends.
2018-07-12 13:02:42 +02:00
Matthias Clasen
63ab523146 wayland: Remove an unused field
GdkDragWayland.suggested_action was entirely unused, so drop it.
2018-07-12 13:02:42 +02:00
Matthias Clasen
12464731f1 Merge branch 'dnd-cleanups' into 'master'
Dnd cleanups

See merge request GNOME/gtk!226
2018-07-02 21:19:45 +00:00
Matthias Clasen
c8e082f296 win32: Adapt to dnd api changes
Follow the GdkDragContext -> GdkDrag change.
2018-07-02 22:52:59 +02:00
Matthias Clasen
64f5afe608 dnd: Rename headers
Rename gdkdnd.h to gdkdrag.h, to go along with gdkdrop.h

This commit includes the necessary updates to the X11, Wayland
and Broadway backends. Other backends have to be updated separately.
2018-07-02 15:00:50 +02:00
Matthias Clasen
7733f646d6 gdk: Rename GdkDragContext to GdkDrag
This is to go along with the newly introduced GdkDrop.

This commit includes the necessary updates to the X11, Wayland
and Broadway backends. Other backends have to be updated separately.
2018-07-02 14:59:26 +02:00