Win32: Re-work cursor handling
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 7 Nov 2017 07:39:48 +0000 (15:39 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 9 Nov 2017 00:30:09 +0000 (08:30 +0800)
commitc06b1cc103b8e7da906db25988f5c94d6d64ad1f
tree1ce2dad6b2004ccd716285e58630cf2c4672fd68
parentc83665005ac9c7ebc878c33132df5386075d79c2
Win32: Re-work cursor handling

Like the X11 and Wayland backends, re-work how the cursors are being
handled.  So, we use a hash table to cache up the HCURSORS that we
create along the way.

We still need to cache up the icon/cursor themes since this is something
that is not part of Windows but was added on to support icon/cursor themes
such as Adwaita on Windows, but should be in-line with what is going on in
GdkCursor.

Also, remove the _gdk_grab_cursor global variable in gdkprivate-win32.h,
and replace it with another variable in the GdkWin32Display structure,
to make things cleaner in the process.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
gdk/win32/gdkcursor-win32.c
gdk/win32/gdkdevice-virtual.c
gdk/win32/gdkdisplay-win32.h
gdk/win32/gdkevents-win32.c
gdk/win32/gdkprivate-win32.h
gdk/win32/gdkwin32display.h
gdk/win32/gdkwindow-win32.c