mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
win32: Create gdk_win32_draw_surface_new()
... and use it.
This commit is contained in:
parent
42cea18f3e
commit
ab0fa08d8e
@ -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);
|
||||
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user