summaryrefslogtreecommitdiff
path: root/gdk/win32
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2017-11-26 13:06:24 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2017-12-02 10:38:40 +0000
commitf0d04f82f8c2835b9c062bb72fa4409328c4c9ed (patch)
tree71ee1e337afa99d07b9873f4f0223cc951ea7fb6 /gdk/win32
parent5e2e0af8b4a39b3174aef4de964d9655d1c7b6ea (diff)
downloadgtk+-f0d04f82f8c2835b9c062bb72fa4409328c4c9ed.tar.gz
GDK W32: Special handling for DELETE requests
1) Ensure that any DELETE requests from the target are sent to GDK, even if both the source and the target are in the same process and it is therefore possible to use a shortcut and call the handler directly in GTK layer 2) Ensure that target GDK doesn't do anything when GTK asks it to send a DELETE request, just report back immediately (the code up the stack does not check for successfullness when request is DELETE, so not giving it any data is OK). The source code already synthesizes a DELETE request, so that side is also taken care of. https://bugzilla.gnome.org/show_bug.cgi?id=786509
Diffstat (limited to 'gdk/win32')
-rw-r--r--gdk/win32/gdkselection-win32.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c
index f53eae3e4b..64f5a53fef 100644
--- a/gdk/win32/gdkselection-win32.c
+++ b/gdk/win32/gdkselection-win32.c
@@ -2168,6 +2168,15 @@ convert_dnd_selection_to_target (GdkAtom target,
fmt.lindex = -1;
fmt.tymed = TYMED_HGLOBAL;
+ /* We rely on GTK+ applications to synthesize the DELETE request
+ * for themselves, since they do know whether a DnD operation was a
+ * move and whether was successful. Therefore, we do not need to
+ * actually send anything here. Just report back without storing
+ * any data.
+ */
+ if (target == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_DELETE))
+ return result;
+
for (format = 0, with_transmute = 0; format == 0 && with_transmute < 2; with_transmute++)
{
for (i = 0;