diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c index 64df7ae3c3..3d52f2d497 100644 --- a/gdk/win32/gdkdevicemanager-win32.c +++ b/gdk/win32/gdkdevicemanager-win32.c @@ -427,10 +427,7 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager) ndevices, ncursors)); #endif /* Create a dummy window to receive wintab events */ - wintab_window = - gdk_win32_display_create_surface (display, - GDK_SURFACE_DRAG, - NULL); + wintab_window = gdk_win32_drag_surface_new (display); g_object_ref (wintab_window); diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c index ad04a0b8da..2bc111b9e2 100644 --- a/gdk/win32/gdkdrag-win32.c +++ b/gdk/win32/gdkdrag-win32.c @@ -1644,18 +1644,6 @@ _gdk_win32_dnd_exit (void) CoUninitialize (); } -static GdkSurface * -create_drag_surface (GdkDisplay *display) -{ - GdkSurface *surface; - - surface = gdk_win32_display_create_surface (display, - GDK_SURFACE_DRAG, - NULL); - - return surface; -} - GdkDrag * _gdk_win32_surface_drag_begin (GdkSurface *surface, GdkDevice *device, @@ -1695,7 +1683,7 @@ _gdk_win32_surface_drag_begin (GdkSurface *surface, g_set_object (&drag_win32->grab_surface, surface); - drag_win32->drag_surface = create_drag_surface (gdk_surface_get_display (surface)); + drag_win32->drag_surface = gdk_win32_drag_surface_new (gdk_surface_get_display (surface)); if (!drag_context_grab (drag)) { diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c index eaf9c84633..92bed6dc8d 100644 --- a/gdk/win32/gdksurface-win32.c +++ b/gdk/win32/gdksurface-win32.c @@ -456,10 +456,6 @@ gdk_win32_display_create_surface (GdkDisplay *display, NULL); break; case GDK_SURFACE_DRAG: - surface = g_object_new (GDK_TYPE_WIN32_DRAG_SURFACE, - "display", display, - NULL); - break; default: g_assert_not_reached (); break; @@ -5159,3 +5155,11 @@ _gdk_win32_surface_invalidate_egl_framebuffer (GdkSurface *surface) } #endif } + +GdkSurface * +gdk_win32_drag_surface_new (GdkDisplay *display) +{ + return g_object_new (GDK_TYPE_WIN32_DRAG_SURFACE, + "display", display, + NULL); +} diff --git a/gdk/win32/gdksurface-win32.h b/gdk/win32/gdksurface-win32.h index 6f12eab527..89d3202729 100644 --- a/gdk/win32/gdksurface-win32.h +++ b/gdk/win32/gdksurface-win32.h @@ -364,6 +364,8 @@ void gdk_win32_surface_move_resize (GdkSurface *window, int width, int height); +GdkSurface *gdk_win32_drag_surface_new (GdkDisplay *display); + RECT gdk_win32_surface_handle_queued_move_resize (GdkDrawContext *draw_context);