mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 00:11:29 +00:00
placessidebar: Don't create a GtkWindow for drag icons
Just use the drag_widget we create before, since GtkWindow drag icons are not allowed anymore.
This commit is contained in:
parent
fd20e42932
commit
0b9dca3d55
@ -1738,22 +1738,18 @@ drag_begin_callback (GtkWidget *widget,
|
||||
GtkPlacesSidebar *sidebar = GTK_PLACES_SIDEBAR (user_data);
|
||||
GtkAllocation allocation;
|
||||
GtkWidget *drag_widget;
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_widget_get_allocation (sidebar->drag_row, &allocation);
|
||||
gtk_widget_hide (sidebar->drag_row);
|
||||
|
||||
drag_widget = GTK_WIDGET (gtk_sidebar_row_clone (GTK_SIDEBAR_ROW (sidebar->drag_row)));
|
||||
window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
sidebar->drag_row_height = allocation.height;
|
||||
gtk_widget_set_size_request (window, allocation.width, allocation.height);
|
||||
gtk_widget_set_size_request (drag_widget, allocation.width, allocation.height);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), drag_widget);
|
||||
gtk_widget_show (window);
|
||||
gtk_widget_set_opacity (window, 0.8);
|
||||
gtk_widget_set_opacity (drag_widget, 0.8);
|
||||
|
||||
gtk_drag_set_icon_widget (context,
|
||||
window,
|
||||
drag_widget,
|
||||
sidebar->drag_row_x,
|
||||
sidebar->drag_row_y);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user