[Xfce4-commits] <xfdesktop:master> Fix for CTRL + drag selections (Bug 10275)
Eric Koegel
noreply at xfce.org
Mon Aug 5 11:08:01 CEST 2013
Updating branch refs/heads/master
to bb9350184566231b0fbf1c03ff54d26d44dc7d8c (commit)
from b73e824438ed12d85e63d601dcc117165b648daf (commit)
commit bb9350184566231b0fbf1c03ff54d26d44dc7d8c
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Mon Aug 5 11:57:57 2013 +0300
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 */
More information about the Xfce4-commits
mailing list