forked from AuroraMiddleware/gtk
macos: move drag motion to GdkMacosDrag
This doesn't help to be pushed off into the surface, as it makes things more different than the X11 implementation.
This commit is contained in:
parent
6c8e176cc0
commit
b64370cd48
@ -326,12 +326,10 @@ gdk_drag_update (GdkDrag *drag,
|
||||
&suggested_action,
|
||||
&possible_actions);
|
||||
|
||||
_gdk_macos_drag_surface_drag_motion (self->drag_surface,
|
||||
x_root - self->hot_x,
|
||||
y_root - self->hot_y,
|
||||
suggested_action,
|
||||
possible_actions,
|
||||
evtime);
|
||||
if (GDK_IS_MACOS_SURFACE (self->drag_surface))
|
||||
_gdk_macos_surface_move (GDK_MACOS_SURFACE (self->drag_surface),
|
||||
x_root - self->hot_x,
|
||||
y_root - self->hot_y);
|
||||
|
||||
if (!self->did_update)
|
||||
{
|
||||
@ -339,6 +337,8 @@ gdk_drag_update (GdkDrag *drag,
|
||||
self->start_y = self->last_y;
|
||||
self->did_update = TRUE;
|
||||
}
|
||||
|
||||
gdk_drag_set_actions (drag, possible_actions);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -31,19 +31,13 @@ typedef struct _GdkMacosDragSurfaceClass GdkMacosDragSurfaceClass;
|
||||
#define GDK_MACOS_DRAG_SURFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MACOS_DRAG_SURFACE, GdkMacosDragSurface))
|
||||
#define GDK_IS_MACOS_DRAG_SURFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MACOS_DRAG_SURFACE))
|
||||
|
||||
GType _gdk_macos_drag_surface_get_type (void);
|
||||
GdkMacosSurface *_gdk_macos_drag_surface_new (GdkMacosDisplay *display,
|
||||
GdkFrameClock *frame_clock,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
void _gdk_macos_drag_surface_drag_motion (GdkMacosDragSurface *self,
|
||||
int x_root,
|
||||
int y_root,
|
||||
GdkDragAction suggested_action,
|
||||
GdkDragAction possible_actions,
|
||||
guint32 evtime);
|
||||
GType _gdk_macos_drag_surface_get_type (void);
|
||||
GdkMacosSurface *_gdk_macos_drag_surface_new (GdkMacosDisplay *display,
|
||||
GdkFrameClock *frame_clock,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -123,16 +123,3 @@ _gdk_macos_drag_surface_new (GdkMacosDisplay *display,
|
||||
|
||||
return g_steal_pointer (&self);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_macos_drag_surface_drag_motion (GdkMacosDragSurface *self,
|
||||
int x_root,
|
||||
int y_root,
|
||||
GdkDragAction suggested_action,
|
||||
GdkDragAction possible_actions,
|
||||
guint32 evtime)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_MACOS_DRAG_SURFACE (self));
|
||||
|
||||
_gdk_macos_surface_move (GDK_MACOS_SURFACE (self), x_root, y_root);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user