dnd: Remove GdkDragContext.is_source
All drag contexts are sources these days, the other ones are GdkDrop now.
This commit is contained in:
@@ -727,9 +727,6 @@ gdk_drag_context_handle_source_event (GdkEvent *event)
|
||||
{
|
||||
context = l->data;
|
||||
|
||||
if (!context->is_source)
|
||||
continue;
|
||||
|
||||
if (!GDK_DRAG_CONTEXT_GET_CLASS (context)->handle_event)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ struct _GdkDragContext {
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
gboolean is_source;
|
||||
GdkSurface *source_surface;
|
||||
GdkSurface *dest_surface;
|
||||
GdkSurface *drag_surface;
|
||||
|
||||
@@ -46,7 +46,6 @@ _gdk_quartz_surface_drag_begin (GdkSurface *window,
|
||||
_gdk_quartz_drag_source_context = g_object_new (GDK_TYPE_QUARTZ_DRAG_CONTEXT,
|
||||
"device", device,
|
||||
NULL);
|
||||
_gdk_quartz_drag_source_context->is_source = TRUE;
|
||||
|
||||
_gdk_quartz_drag_source_context->source_surface = window;
|
||||
g_object_ref (window);
|
||||
|
||||
@@ -402,7 +402,6 @@ _gdk_wayland_surface_drag_begin (GdkSurface *surface,
|
||||
NULL);
|
||||
context = GDK_DRAG_CONTEXT (context_wayland);
|
||||
context->source_surface = g_object_ref (surface);
|
||||
context->is_source = TRUE;
|
||||
|
||||
context_wayland->dnd_surface = create_dnd_surface (gdk_surface_get_display (surface));
|
||||
context_wayland->dnd_wl_surface = gdk_wayland_surface_get_wl_surface (context_wayland->dnd_surface);
|
||||
|
||||
@@ -1741,7 +1741,6 @@ _gdk_win32_surface_drag_begin (GdkSurface *window,
|
||||
drag_win32 = GDK_WIN32_DRAG_CONTEXT (drag);
|
||||
|
||||
g_set_object (&drag->source_surface, window);
|
||||
drag->is_source = TRUE;
|
||||
|
||||
GDK_NOTE (DND, g_print ("_gdk_win32_surface_drag_begin\n"));
|
||||
|
||||
@@ -2551,8 +2550,6 @@ gdk_win32_drag_context_handle_event (GdkDragContext *drag,
|
||||
{
|
||||
GdkWin32DragContext *drag_win32 = GDK_WIN32_DRAG_CONTEXT (drag);
|
||||
|
||||
if (!drag->is_source)
|
||||
return FALSE;
|
||||
if (!drag_win32->grab_seat)
|
||||
return FALSE;
|
||||
if (!drag_win32->handle_events)
|
||||
|
||||
@@ -284,8 +284,7 @@ gdk_x11_drag_context_find (GdkDisplay *display,
|
||||
: context_x11->proxy_xid)
|
||||
: None;
|
||||
|
||||
if ((context->is_source) &&
|
||||
((source_xid == None) || (context->source_surface &&
|
||||
if (((source_xid == None) || (context->source_surface &&
|
||||
(GDK_SURFACE_XID (context->source_surface) == source_xid))) &&
|
||||
((dest_xid == None) || (context_dest_xid == dest_xid)))
|
||||
return context;
|
||||
@@ -2114,8 +2113,6 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
NULL);
|
||||
x11_context = GDK_X11_DRAG_CONTEXT (context);
|
||||
|
||||
context->is_source = TRUE;
|
||||
|
||||
g_signal_connect (display, "xevent", G_CALLBACK (gdk_x11_drag_context_xevent), context);
|
||||
|
||||
precache_target_list (context);
|
||||
@@ -2433,8 +2430,6 @@ gdk_x11_drag_context_handle_event (GdkDragContext *context,
|
||||
{
|
||||
GdkX11DragContext *x11_context = GDK_X11_DRAG_CONTEXT (context);
|
||||
|
||||
if (!context->is_source)
|
||||
return FALSE;
|
||||
if (!x11_context->grab_seat)
|
||||
return FALSE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user