From 3b1d04ab88dd336c24d8e563460fa9e1c229d906 Mon Sep 17 00:00:00 2001 From: Eric Koegel Date: Mon, 5 Aug 2013 11:57:57 +0300 Subject: [PATCH] Fix for CTRL + drag selections (Bug 10275) When a rubber band selection area shrinks, the icon must be in the old rubber band area and not in the new one for it to be removed. Otherwise, when doing a rubber band with the CTRL modifier key any time the area shrinks it will de-select all the icons that weren't in the new rubber band area. --- src/xfdesktop-icon-view.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c index 4ae5b53..6a8f223 100644 --- a/src/xfdesktop-icon-view.c +++ b/src/xfdesktop-icon-view.c @@ -1151,7 +1151,11 @@ xfdesktop_icon_view_motion_notify(GtkWidget *widget, GdkRectangle extents, dummy; XfdesktopIcon *icon = l->data; + /* To be removed, it must intersect the old rectangle and + * not intersect the new one. This way CTRL + rubber band + * works properly (Bug 10275) */ if(xfdesktop_icon_get_extents(icon, NULL, NULL, &extents) + && gdk_rectangle_intersect(&extents, &old_rect, NULL) && !gdk_rectangle_intersect(&extents, new_rect, &dummy)) { /* remove the icon from the selected list */ -- 1.8.1.2