gint drag_row_height;
gint drag_row_x;
gint drag_row_y;
- gint drag_root_x;
- gint drag_root_y;
+ gint drag_x;
+ gint drag_y;
GtkWidget *row_placeholder;
DropState drop_state;
GtkGesture *long_press_gesture;
{
GtkPlacesSidebar *sidebar = GTK_PLACES_SIDEBAR (user_data);
guint state;
- double x_root, y_root;
+ double x, y;
if (sidebar->drag_row == NULL || sidebar->dragging_over)
return FALSE;
!(state & GDK_BUTTON1_MASK))
return FALSE;
- gdk_event_get_root_coords ((GdkEvent *) event, &x_root, &y_root);
+ gdk_event_get_coords ((GdkEvent *) event, &x, &y);
if (gtk_drag_check_threshold (widget,
- sidebar->drag_root_x, sidebar->drag_root_y,
- x_root, y_root))
+ sidebar->drag_x, sidebar->drag_y,
+ x, y))
{
sidebar->dragging_over = TRUE;
gtk_drag_begin_with_coordinates (widget,
gdk_event_get_device ((GdkEvent*) event),
sidebar->source_targets, GDK_ACTION_MOVE,
- -1, -1);
+ sidebar->drag_x, sidebar->drag_y);
}
return FALSE;
GtkPlacesSidebar *sidebar;
GtkPlacesSidebarSectionType section_type;
gdouble x, y;
- double x_root, y_root;
g_object_get (GTK_SIDEBAR_ROW (row),
"sidebar", &sidebar,
if (section_type == SECTION_BOOKMARKS)
{
gdk_event_get_coords ((GdkEvent *) event, &x, &y);
- gdk_event_get_root_coords ((GdkEvent *) event, &x_root, &y_root);
sidebar->drag_row = GTK_WIDGET (row);
sidebar->drag_row_x = (gint)x;
sidebar->drag_row_y = (gint)y;
- sidebar->drag_root_x = x_root;
- sidebar->drag_root_y = y_root;
+ sidebar->drag_x = x;
+ sidebar->drag_y = y;
}
g_object_unref (sidebar);