[Xfce4-commits] <xfdesktop:master> Fix for shift + drag selections
Eric Koegel
noreply at xfce.org
Mon Mar 5 19:30:07 CET 2012
Updating branch refs/heads/master
to ab5aac37a7855b79c2bb1b2df686e938c477ff34 (commit)
from c5dccaa729d20dccb8ee220e06b31a41a79850da (commit)
commit ab5aac37a7855b79c2bb1b2df686e938c477ff34
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Tue Feb 7 17:34:11 2012 +0300
Fix for shift + drag selections
Selecting icons during a shift drag action now works. Doing a
right click or shift + left click without dragging the mouse will
cause the root menu to popup. For bug 7525.
src/xfce-desktop.c | 4 ----
src/xfdesktop-icon-view.c | 12 +++++++++---
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index bcd4bd8..fc7839f 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -861,10 +861,6 @@ xfce_desktop_button_press_event(GtkWidget *w,
xfce_desktop_popup_secondary_root_menu(XFCE_DESKTOP(w),
button, evt->time);
return TRUE;
- } else if(button == 3 || (button == 1 && (state & GDK_SHIFT_MASK))) {
- xfce_desktop_popup_root_menu(XFCE_DESKTOP(w),
- button, evt->time);
- return TRUE;
}
}
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index fb18856..c803206 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -815,8 +815,14 @@ xfdesktop_icon_view_button_release(GtkWidget *widget,
TRACE("entering btn=%d", evt->button);
- if(evt->button == 3 && !icon_view->priv->definitely_dragging && !icon_view->priv->definitely_rubber_banding)
- xfce_desktop_popup_root_menu(XFCE_DESKTOP(widget), evt->button, evt->time);
+ if((evt->button == 3 || (evt->button == 1 && (evt->state & GDK_SHIFT_MASK))) &&
+ icon_view->priv->definitely_dragging == FALSE &&
+ icon_view->priv->definitely_rubber_banding == FALSE)
+ {
+ xfce_desktop_popup_root_menu(XFCE_DESKTOP(widget),
+ evt->button,
+ evt->time);
+ }
if(evt->button == 1 || evt->button == 3) {
DBG("unsetting stuff");
@@ -1876,7 +1882,7 @@ xfdesktop_icon_view_select_between(XfdesktopIconView *icon_view,
{
if(start_row > end_row || (start_row == end_row && start_col > end_col)) {
/* flip start and end */
- guint16 tmpr = start_row, tmpc = end_row;
+ guint16 tmpr = start_row, tmpc = start_col;
start_row = end_row;
start_col = end_col;
More information about the Xfce4-commits
mailing list