gtk2/gdk/win32
darkcutler 64a959dad9 Fix DnD on Windows
DnD under Windows needed 3 fixes to work with Gtk.DropTarget.

1. The droptarget_w32format_contentformat_map list never gets
filled so the gdk_win32_drop_read_async throws
"No compatible transfer format found".
This is an easy fix and done the same way in the win32 clipboard code.

2. After a drop no gdk_drop_emit_leave_event gets emitted.
This causes a second drop to trigger a bunch of assertion
'self->drop == drop' failed because the first drop is still active.
This is also an easy fix and done the same way by the macos backend.

3. Handling gdk_drop_status/gdk_drop_get_actions interaction.
In gtk_drop_target_do_drop the code
```gdk_drop_finish (self->drop, gdk_drop_get_actions (self->drop));```
calls the finish operation with the actions of the drop which triggers
```g_return_if_fail (gdk_drag_action_is_unique (action));```
in gdk_drop_finish. The code assumes that GdkDrop::actions gets
narrowed down by calling gdk_drop_status. This is hard to assure
because at the same time gdk_drop_get_actions is used by
gtk_drop_target_accept to figure out if a drag is accepted.
GdkDrop::actions serves a double purpose here as the supported source
actions and the currently agreed on action. Both the x11 and the
wayland backend get this wrong somewhat too. Under wayland/x11 when
a drag coming from a source that supports both MOVE and COPY is
first hovering a drop target that only supports COPY it is afterwards
no longer accepted by other drop targets only accepting MOVE.
Under x11 this is permanent for this drag but with wayland the drag
recovers when hovering other widgets. The win32 backend now sets the
supported source actions before any enter/move/drop and narrows them
down in gdk_win32_drop_status.

The patch only touches the win32 backend and fixes all three issues,
for me restoring DnD under windows.

Closes #4498
2022-07-25 15:16:23 +00:00
..
rc Drop Autotools build 2017-08-14 22:23:09 +01:00
gdkcairocontext-win32.c gdk: hdr => high depth 2021-10-06 22:50:07 +02:00
gdkcairocontext-win32.h GDK/Win32: Remove layered windows usage 2021-01-18 12:48:16 +08:00
gdkclipboard-win32.c gdkclipboard-win32.c: Fix call to gdk_clipboard_claim_remote() 2022-03-31 10:55:39 +08:00
gdkclipboard-win32.h GDK W32: Another massive clipboard and DnD update 2018-03-29 17:43:53 +00:00
gdkclipdrop-win32.c Fix last error reporting when calling GetClipboardOwner 2022-02-25 17:14:39 +01:00
gdkclipdrop-win32.h win32: Move from g_memdup() to g_memdup2() 2021-02-11 14:22:23 +00:00
gdkcursor-win32.c Remove all nicks and blurbs from param specs 2022-05-11 18:16:29 +02:00
gdkdevice-virtual.c win32: Stop using the query_state vfunc 2020-08-26 17:56:41 -04:00
gdkdevice-virtual.h win32: Stop using _gdk_device_query_state 2020-08-26 17:56:41 -04:00
gdkdevice-win32.c GdkWin32: Remove the global screen offset 2021-11-07 19:08:30 +01:00
gdkdevice-win32.h win32: Stop using _gdk_device_query_state 2020-08-26 17:56:41 -04:00
gdkdevice-winpointer.c GdkWin32: Remove the global screen offset 2021-11-07 19:08:30 +01:00
gdkdevice-winpointer.h Initialize WinPointer and enumerate devices 2021-08-19 15:57:41 +02:00
gdkdevice-wintab.c GdkWin32: Remove the global screen offset 2021-11-07 19:08:30 +01:00
gdkdevice-wintab.h win32: Stop using _gdk_device_query_state 2020-08-26 17:56:41 -04:00
gdkdevicemanager-win32.c win32: Don't include gdkinternals.h 2021-09-24 22:50:29 +02:00
gdkdevicemanager-win32.h Initialize WinPointer and enumerate devices 2021-08-19 15:57:41 +02:00
gdkdisplay-win32.c gdkdisplay-win32.c: Clean up GL initialization further 2022-01-19 11:56:32 +08:00
gdkdisplay-win32.h Cleanup "GDK/Win32: Try to fix initializing GLES contexts" 2022-01-19 11:56:32 +08:00
gdkdisplaymanager-win32.c win32: Don't include gdkinternals.h 2021-09-24 22:50:29 +02:00
gdkdrag-win32.c GdkWin32: Remove the global screen offset 2021-11-07 19:08:30 +01:00
gdkdrop-win32.c Fix DnD on Windows 2022-07-25 15:16:23 +00:00
gdkevents-win32.c GdkWin32: Add support for DirectManipulation 2022-05-15 14:37:55 +02:00
gdkglcontext-win32-egl.c GDK-Win32: Realize EGL using common realization code 2021-11-08 15:40:49 +08:00
gdkglcontext-win32-wgl.c glcontext-win32-wgl: Respect user required version, use display as minimum 2022-06-04 20:48:40 +02:00
gdkglcontext-win32.c GDK-Win32: Drop GDK_WIN32_ENABLE_EGL flag 2021-11-08 15:25:24 +08:00
gdkglcontext-win32.h GDK-Win32: Drop GDK_WIN32_ENABLE_EGL flag 2021-11-08 15:25:24 +08:00
gdkglobals-win32.c GdkWin32: Remove _gdk_input_codepage variable 2022-01-17 14:14:55 +01:00
gdkhdataoutputstream-win32.c GDK/Win32: Use lowercase windows.h 2021-09-26 21:52:12 +08:00
gdkhdataoutputstream-win32.h GDK W32: Another massive clipboard and DnD update 2018-03-29 17:43:53 +00:00
gdkinput-dmanipulation.c DirectManipulation: Account for DPI scale 2022-05-24 11:37:06 +02:00
gdkinput-dmanipulation.h GdkWin32: Add support for DirectManipulation 2022-05-15 14:37:55 +02:00
gdkinput-winpointer.c GDK-Win32: Fix build 2021-09-30 16:21:38 +08:00
gdkinput-winpointer.h Handle WinPointer input 2021-08-19 15:57:41 +02:00
gdkkeys-win32-impl-wow64.c Rewrite GdkWin32Keymap (load table directly from layout DLL) 2022-01-12 19:01:35 +01:00
gdkkeys-win32-impl.c gdkkeys-win32: Also ignore Ctrl + Shift (etc.) 2022-02-09 10:43:07 +01:00
gdkkeys-win32.c gdkkeys-win32: Only perform substitution as last-resort 2022-02-27 16:40:58 +01:00
gdkkeys-win32.h gdkkeys-win32: Fix capslock handling 2022-01-12 21:43:53 +01:00
gdkmain-win32.c GdkWin32: Add support for DirectManipulation 2022-05-15 14:37:55 +02:00
gdkmonitor-win32.c GdkWin32: Remove the global screen offset 2021-11-07 19:08:30 +01:00
gdkmonitor-win32.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkprivate-win32.h GdkWin32: Add support for DirectManipulation 2022-05-15 14:37:55 +02:00
gdkproperty-win32.c GdkWin32: Add code for gtk-overlay-scrolling setting 2022-06-17 11:06:43 +02:00
gdkscreen-win32.c Raise _WIN32_WINNT macro to target Windows 7 API 2021-08-19 15:57:33 +02:00
gdksurface-win32.c GdkWin32: Add support for DirectManipulation 2022-05-15 14:37:55 +02:00
gdksurface-win32.h GdkWin32: Add support for DirectManipulation 2022-05-15 14:37:55 +02:00
gdkvulkancontext-win32.c gdk: hdr => high depth 2021-10-06 22:50:07 +02:00
gdkvulkancontext-win32.h The big versioning cleanup 2018-02-06 01:16:32 -05:00
gdkwin32.h gdk: Make GdkKeymap a private api 2020-04-06 16:32:03 -04:00
gdkwin32cursor.h GDK/Win32: Use lowercase windows.h 2021-09-26 21:52:12 +08:00
gdkwin32display.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkwin32displaymanager.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkwin32dnd-private.h win32: Don't include gdkinternals.h 2021-09-24 22:50:29 +02:00
gdkwin32dnd.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkwin32glcontext.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkwin32id.c Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkwin32keys.h Documentation fixes 2021-05-20 19:17:49 -04:00
gdkwin32langnotification.c Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkwin32langnotification.h GDK W32: Test for IME correctly 2019-03-22 16:58:59 +00:00
gdkwin32misc.h Replace "gdouble" with "double" 2020-07-25 00:47:36 +02:00
gdkwin32monitor.h gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area 2020-07-29 17:57:30 +02:00
gdkwin32screen.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkwin32surface.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
meson.build GdkWin32: Add support for DirectManipulation 2022-05-15 14:37:55 +02:00
pktdef.h
winpointer.h Add winpointer.h header file for type declarations 2021-08-19 15:57:39 +02:00
wintab.h
xcursors.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00