aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/misc/e-reflow.c23
-rw-r--r--widgets/misc/e-reflow.h3
2 files changed, 25 insertions, 1 deletions
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index 051cb3d2ab..fa0fd42de8 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -1216,7 +1216,13 @@ e_reflow_selection_event_real (EReflow *reflow, GnomeCanvasItem *item, GdkEvent
case 1: /* Fall through. */
case 2:
row = er_find_item (reflow, item);
- e_selection_model_do_something(reflow->selection, row, 0, event->button.state);
+ if (event->button.button == 1) {
+ reflow->maybe_did_something =
+ e_selection_model_maybe_do_something(reflow->selection, row, 0, event->button.state);
+ reflow->maybe_in_drag = TRUE;
+ } else {
+ e_selection_model_do_something(reflow->selection, row, 0, event->button.state);
+ }
break;
case 3:
row = er_find_item (reflow, item);
@@ -1227,6 +1233,17 @@ e_reflow_selection_event_real (EReflow *reflow, GnomeCanvasItem *item, GdkEvent
break;
}
break;
+ case GDK_BUTTON_RELEASE:
+ if (event->button.button == 1) {
+ if (reflow->maybe_in_drag) {
+ reflow->maybe_in_drag = FALSE;
+ if (!reflow->maybe_did_something) {
+ row = er_find_item (reflow, item);
+ e_selection_model_do_something(reflow->selection, row, 0, event->button.state);
+ }
+ }
+ }
+ break;
case GDK_KEY_PRESS:
return_val = e_selection_model_key_press(reflow->selection, (GdkEventKey *) event);
break;
@@ -1320,6 +1337,10 @@ e_reflow_init (EReflow *reflow)
reflow->need_height_update = FALSE;
reflow->need_column_resize = FALSE;
+ reflow->need_reflow_columns = FALSE;
+
+ reflow->maybe_did_something = FALSE;
+ reflow->maybe_in_drag = FALSE;
reflow->default_cursor_shown = TRUE;
reflow->arrow_cursor = NULL;
diff --git a/widgets/misc/e-reflow.h b/widgets/misc/e-reflow.h
index 0aed25945c..7d002a0a69 100644
--- a/widgets/misc/e-reflow.h
+++ b/widgets/misc/e-reflow.h
@@ -112,6 +112,9 @@ struct _EReflow
guint need_reflow_columns : 1;
guint default_cursor_shown : 1;
+
+ guint maybe_did_something : 1;
+ guint maybe_in_drag : 1;
GdkCursor *arrow_cursor;
GdkCursor *default_cursor;
};