summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2013-08-05 11:57:57 +0300
committerEric Koegel <eric.koegel@gmail.com>2013-08-05 12:05:54 +0300
commitbb9350184566231b0fbf1c03ff54d26d44dc7d8c (patch)
tree63d1edd4493b4a540eacae0a2e5e4dd96acd0880
parentb73e824438ed12d85e63d601dcc117165b648daf (diff)
downloadxfdesktop-bb9350184566231b0fbf1c03ff54d26d44dc7d8c.tar.gz
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.
-rw-r--r--src/xfdesktop-icon-view.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index 4ae5b53f..6a8f2239 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 */