Commit Graph

24 Commits

Author SHA1 Message Date
Benjamin Otte
47e0539968 x11: Don't include gdkinternals.h 2021-09-24 22:50:29 +02:00
Benjamin Otte
afc5f46ca9 x11: Remove unused headers 2021-07-20 14:00:25 -04:00
Matthias Clasen
c78036fc51 x11: Handle X-specific targets in drops
This code is very similar to the handling for these
targets in the clipboard case.

Fixes: #3642
2021-02-03 14:17:04 -05:00
Benjamin Otte
d375dce9f5 Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
Benjamin Otte
d7266b25ba Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
Alexander Larsson
bca4af360d X11 dnd: Calculate relative coords right in events
GdkSurface.x/y is mostly 0, we need to look atht GdkX11Surface->abs_x/y.
2020-05-14 11:46:33 +02:00
Benjamin Otte
7cd728a0ea gdk: Make gdk_drop_status() take preferred action
This allows textview/text dnd to properly display a MOVE icon when in
the widget the drag started from but a COPY icon otherwise.
2020-03-02 04:43:56 +01:00
Benjamin Otte
28dced597f gdk: Remove gdk_text_property_to_utf8_list_for_display()
A lot of files became empty now, so they have been removed, which makes
this commit seem larger than it is.
2020-02-23 01:59:26 +01:00
Benjamin Otte
992173c382 x11: Register DND atoms with all other atoms
It's 2020, there's no need to be restrained with registering atoms.
2020-02-23 01:59:00 +01:00
Benjamin Otte
608e624ecf x11: When clearing old Drop, emit LEAVE event
This can happen when the old DND operation died (like due to a crash or
a broken XWayland compositor.
2020-02-21 18:19:16 +01:00
Benjamin Otte
808961564c gdk: Make DRAG_ENTER event take x/y coordinates
Make it mirror the behavior of ENTER/LEAVE events.
2020-02-21 18:19:16 +01:00
Matthias Clasen
7e80c39aee Remove root coords from the GdkDrop api 2020-02-21 00:39:41 -05:00
Matthias Clasen
19280db075 x11: Fix release build warnings 2020-01-18 11:49:16 -05:00
Carlos Garnacho
f6f331efe3 gdk/x11: Forward suggested action (if any) to XdndStatus
Go ahead with the suggested action, so the drag source may update
cursor feedback properly, and eventually result in the correct
action.
2020-01-08 18:48:21 -05:00
Benjamin Otte
c0bbfd950d x11: Actually call the finished func when finishing
Copy/paste madness was calling the status func...
2019-06-18 15:53:18 -04:00
Matthias Clasen
712a5d4f25 Get rid of GdkSurfaceImpl
We don't need the complicated wrapper system anymore,
since client-side windows are gone. This commit moves
all the vfuncs to GtkSurfaceClass, and changes the
backends to just derive their surface implementation
from GdkSurface.
2019-05-28 20:25:14 +00:00
Matthias Clasen
64fd5158bf gdk: Change some async dnd api
The pattern we generally follow is to put the
async result right after the source object, in
finish functions. Do this for gdk_drop_read_finish.
2019-04-02 15:11:06 +00:00
Benjamin Otte
359bc7695c build: Reintroduce warning flags from autotools
Some of the flags got lost in the meson transition or were demoted from
error flags to warning flags.
This commit reintroduces them.

It also includes fixes for the code that had warnings with those flags.
The big one being -Wshadow.
2019-01-22 04:33:12 +01: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
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
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
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