Commit Graph

8421 Commits

Author SHA1 Message Date
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
Matthias Clasen
9c3de51412 Merge branch 'wip/cursor-output-scale-changes' into 'master'
wayland: Update cursor surface scale when output scale changes

See merge request GNOME/gtk!224
2018-06-29 15:08:17 +00:00
Jonas Ådahl
dfd1372a9b wayland: Update cursor surface scale when output scale changes
Also update the cursor surfaces of every seat when an output changes
scale. This could for example happen when a monitor scale is changed via
Settings.
2018-06-28 12:44:22 +02:00
Rico Tzschichholz
b80942ec88 gdk: Fix some g-i annotations warnings 2018-06-27 09:00:17 +02:00
Matthias Clasen
8755d884f3 Remove a lot of Since annotations
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
2018-06-25 19:55:04 -04:00
Benjamin Otte
d13843ee2a gdk: Remove GDK_SURFACE_FOREIGN
We don't create surfaces of that type anymore.
2018-06-26 00:47:40 +02:00
Matthias Clasen
5c46c81067 x11: Fix dnd action handling
We were mistakenly assigning an Atom to a flags value.
2018-06-20 18:10:50 -04:00
Matthias Clasen
cd99f82e0c Merge branch 'master' into 'issue1084'
# Conflicts:
#   gdk/gdk.c
2018-06-20 14:21:24 +00:00
Benjamin Otte
06bba15f62 win32: Fix typo
This should fix gtk-doc erroring out.
2018-06-19 21:45:44 +02:00
Benjamin Otte
4d4ec2dbfb dnd: gdk_drag_action_is_unique() should return a boolean 2018-06-19 19:44:17 +02:00
myfreeweb
a1bcbdd02a wayland: Use shm_open(SHM_ANON) on FreeBSD
This functionality is similar to Linux's memfd. It creates anonymous shared memory without touching the filesystem, which allows it to work in Capsicum capability mode (sandbox).
2018-06-19 11:45:49 -04:00
Benjamin Otte
cbbb7604b6 x11: Set background as transparent as possible
Instead of making the background black, make it transparent black for
RGBA visuals and set a None background otherwise.
2018-06-18 23:49:53 +02:00
Benjamin Otte
a2839d157f dnd: Remove unused time arguments 2018-06-18 23:49:53 +02:00
Benjamin Otte
b3d424c2d7 dnd: Remove GdkDragContext.dest_surface
The variable is now unused
2018-06-18 23:49:53 +02:00
Руслан Ижбулатов
bf3ea24489 GDK W32: Remove gdk_win32_surface_foreign_new_for_display
That function is now unused.
2018-06-18 23:49:53 +02:00
Руслан Ижбулатов
997e8c1ae1 GDK W32: Adapt to dest_surface removal, misc changes
* There's no GdkDragContext->dest_surface anymore.
  Add dest_window field to GdkWin32DragContext,
  and use that instead.
* Remove unused function prototypes
* Add more comments
* Rename variables and fields from 'window' to 'surface'
  where appropriate
* Fix header indentation a bit
* Try to ensure that uninitialized/unknown handle variables
  and fields are set to INVALID_HANDLE_VALUE instead of NULL,
  as there may be cases where NULL is a valid handle value.
2018-06-18 23:49:53 +02:00
Benjamin Otte
aa1f0cfd4f dnd: Remove GdkDragContext.is_source
All drag contexts are sources these days, the other ones are GdkDrop
now.
2018-06-18 23:49:53 +02:00
Benjamin Otte
45a6146ca6 x11: Remove gdk_x11_surface_foreign_new_for_display()
People who want to use foreign windows should use X directly.
2018-06-18 23:49:53 +02:00
Benjamin Otte
bc63001deb x11: Store the XID instead of a GdkSurface
This might be foreign Windows and we don't want to create surfaces for
those.

Also, stop using GdkDragContext.dest_surface, that variable is meant to
go away.
2018-06-18 23:49:53 +02:00
Benjamin Otte
47b47f5835 x11: Simplify test
Now that we have gdk_drag_context_get_display(), use it.
2018-06-18 23:49:52 +02:00
Benjamin Otte
1b2dccd143 x11: xdnd_send_event() always returns TRUE
Make it return nothing instead and delete the code that handled the
FALSE case.
2018-06-18 23:49:52 +02:00
Benjamin Otte
7e09aa3caa x11: Don't multiply X values by the scale factor
This is fallout from a too eager change in
bdb442be21.
2018-06-18 23:49:52 +02:00
Benjamin Otte
6633d4130a dnd: Make the base Drag/Drop types abstract
This way, they'll be ignored by the testsuite.

And we don't want to instantiate them anyway, the backends have
their own subclasses.
2018-06-18 23:49:52 +02:00
Benjamin Otte
a960641ace dnd: GdkDragContext is no longer a GdkDrop subclass
This includes a bunch of header cleanup
2018-06-18 23:49:52 +02:00
Benjamin Otte
f982c9c8f8 dnd: Remove gdk_drag_status() and gdk_drag_finish()
Those functions are unused and have been replaced by their equivalents
gdk_drop_status() and gdk_drop_finish().
2018-06-18 23:49:52 +02:00
Benjamin Otte
a1cee7fa65 surface: Kill event masks
In particular, this patch removes:
  gdk_surface_get_events()
  gdk_surface_set_events()
  gdk_surface_get_device_events()
  gdk_surface_set_device_events()

Event masks so far still exist for grabs.
2018-06-18 23:49:52 +02:00
Benjamin Otte
d0ebdf00f8 x11: Store the source surface as an XID
Don't create a foreign GDK surface, just store the XID.

With this, we can avoid GDK APIs that we want to get rid of and just
use the X counterpart.
2018-06-18 23:49:52 +02:00
Benjamin Otte
dd30a288f2 x11: Split drag and drop contexts
While doing so, turn the drop context into a GdkDrop subclass and no
longer pretend to be a GdkDragContext.
2018-06-18 23:49:52 +02:00
Benjamin Otte
005781021e x11: Handle events on drag side differently
Instead of using the filters that the drop side uses, handle events in
the event filter installed by the DragContext.
2018-06-18 23:49:52 +02:00
Benjamin Otte
14f0a25531 x11: Change the way local Drop => Drag is shortcut
This is one step further towards untangling drag and drop parts of X11
DND.
2018-06-18 23:49:52 +02:00
Benjamin Otte
8db379d85b x11: Remove unused argument
The propagate argument is always FALSE, so just use FALSE everywhere.
2018-06-18 23:49:52 +02:00
Benjamin Otte
6b65aaab21 x11: switch a bunch of variable types
GdkDragContext => GdkDrop

This is all in preparation of separation of the drag and drop.

Also, don't check for GDK_DRAG_PROTO_XDND anymore - it's the only
possible value for the protocol on the target side.
2018-06-18 23:49:52 +02:00