summaryrefslogtreecommitdiff
path: root/gdk/win32/gdkwindow-win32.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2017-11-02 02:02:37 +0100
committerBenjamin Otte <otte@redhat.com>2017-11-02 12:42:58 +0100
commit9c98adcd156129f902ddc35f5ab922b464b1418d (patch)
tree9209aed5312fa016e39c03505c7322637b28ba3c /gdk/win32/gdkwindow-win32.c
parentd380cf114bb16eee08be167e484d2f2f79afaae5 (diff)
downloadgtk+-9c98adcd156129f902ddc35f5ab922b464b1418d.tar.gz
gdk: Remove GdkWindow.set_device_cursor() vfunc
That one calls through to GdkDevice.set_window_cursor(), so let's just use that one.
Diffstat (limited to 'gdk/win32/gdkwindow-win32.c')
-rw-r--r--gdk/win32/gdkwindow-win32.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index d4c865c6b5..0350a6cc92 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -192,7 +192,6 @@ gdk_window_impl_win32_init (GdkWindowImplWin32 *impl)
GdkDisplay *display = gdk_display_get_default ();
impl->toplevel_window_type = -1;
- impl->cursor = NULL;
impl->hicon_big = NULL;
impl->hicon_small = NULL;
impl->hint_flags = 0;
@@ -202,14 +201,6 @@ gdk_window_impl_win32_init (GdkWindowImplWin32 *impl)
impl->num_transients = 0;
impl->changing_state = FALSE;
impl->window_scale = 1;
-
- if (display != NULL)
- /* Replace WM-defined default cursor with the default cursor
- * from our theme. Otherwise newly-opened windows (such as popup
- * menus of all kinds) will have WM-default cursor when they are
- * first shown, which will be replaced by our cursor only later on.
- */
- impl->cursor = _gdk_win32_display_get_cursor_for_type (display, GDK_LEFT_PTR);
}
static void
@@ -229,8 +220,6 @@ gdk_window_impl_win32_finalize (GObject *object)
gdk_win32_handle_table_remove (window_impl->handle);
}
- g_clear_object (&window_impl->cursor);
-
g_clear_pointer (&window_impl->snap_stash, g_free);
g_clear_pointer (&window_impl->snap_stash_int, g_free);
@@ -2004,46 +1993,6 @@ _gdk_modal_current (void)
}
static void
-gdk_win32_window_set_device_cursor (GdkWindow *window,
- GdkDevice *device,
- GdkCursor *cursor)
-{
- GdkWindowImplWin32 *impl;
- GdkCursor *previous_cursor;
-
- impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
-
- if (GDK_WINDOW_DESTROYED (window))
- return;
-
- GDK_NOTE (MISC, g_print ("gdk_win32_window_set_cursor: %p: %p\n",
- GDK_WINDOW_HWND (window),
- cursor));
-
- /* First get the old cursor, if any (we wait to free the old one
- * since it may be the current cursor set in the Win32 API right
- * now).
- */
- previous_cursor = impl->cursor;
-
- if (cursor)
- impl->cursor = g_object_ref (cursor);
- else
- /* Use default cursor otherwise. Don't just set NULL cursor,
- * because that will just hide the cursor, which is not
- * what the caller probably wanted.
- */
- impl->cursor = _gdk_win32_display_get_cursor_for_type (gdk_device_get_display (device),
- GDK_LEFT_PTR);
-
- GDK_DEVICE_GET_CLASS (device)->set_window_cursor (device, window, impl->cursor);
-
- /* Destroy the previous cursor */
- if (previous_cursor != NULL)
- g_object_unref (previous_cursor);
-}
-
-static void
gdk_win32_window_get_geometry (GdkWindow *window,
gint *x,
gint *y,