GDK W32: Adapt to GdkDrop and GdkDragContext changes
authorРуслан Ижбулатов <lrn1986@gmail.com>
Tue, 5 Jun 2018 23:03:51 +0000 (23:03 +0000)
committerBenjamin Otte <otte@redhat.com>
Mon, 18 Jun 2018 21:49:52 +0000 (23:49 +0200)
commit8ee4de804c94cbf5a29b114f855ec3bab65add6b
tree6690aceaedf5347699c150cf0a31de095eaad155
parentdcf432d7d063a94d2eeea0f8f9a590f0e14f5f51
GDK W32: Adapt to GdkDrop and GdkDragContext changes

* Remove clipdrop->dnd_target_state, it's not used anymore
* Remove non-functioning _gdk_dropfiles_store(), store dropfiles
  list in GdkWin32Drop instead
* Fix multiple comment typos
* Fix _gdk_win32_get_clipboard_format_name_as_interned_mimetype() to
  leave names that look like mime/types alone
* Refactor _gdk_win32_add_w32format_to_pairs() to populate
  GdkContentFormatsBuilder directly, instead of making a GList
* Rename context -> drag (still using GdkDragContext type,
  but [almost?] all variables and comments say "drag" now)
* Rename GdkDropContext -> GdkDrop
* Rename some parameter names for clarity
* Rewrite local protocol to look more like OLE2 protocol
  instead of mirroring the structure of the X11 API.
* Add handle_events field to GdkWin32DragContext,
  to shut off event handling (temporary fix until GTK is patched up)
* Remove _gdk_win32_drag_context_find() - the drag object is stored
  in GdkDrop instead. Use _gdk_win32_find_drag_for_dest_surface()
  to get it initially.
* Remove target_ctx_for_window, droptarget context is stored
  in the surface instead.
* Call gdk_drag_context_set_cursor() just like wayland backend does
  (slightly broken for now)
* Clean up the action choosing code (filter source actions by using
  keyboard state, pass that to GTK, get all actions supported by GTK in
  response, match them up with filtered source actions, return the
  result, falling back to COPY in case of multiple actions)
* Check drag_win32->protocol instead of the use_ole2_dnd variable where
  possible
* Remove protocol checks from functions that are only used by the local
  protocol
* Use event state to manufacture the keyboard state for WM_MOUSEMOVE
* Change function names printed by GDK_NOTE to name the actual
  functions, not their theoretical generic GDK stack ancestors
* Consistently use drag_win32 and drop_win32 variables instead of a mix
  of that and win32_drag/win32_drop
* Return FALSE from button handler to ensure that GTK gets the button
  event to break implicit grab
* Emit leave event on failed idroptarget_drop() calls
gdk/win32/gdkclipdrop-win32.c
gdk/win32/gdkclipdrop-win32.h
gdk/win32/gdkdrag-win32.c
gdk/win32/gdkdrop-win32.c
gdk/win32/gdkprivate-win32.h
gdk/win32/gdksurface-win32.c
gdk/win32/gdksurface-win32.h
gdk/win32/gdkwin32dnd-private.h
gdk/win32/gdkwin32dnd.h