summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-02-10 23:53:20 +0100
committerBoris Faure <billiob@gmail.com>2015-02-10 23:55:25 +0100
commit337fd3bdb11b6fa5fa703828400b4f29fa899c80 (patch)
tree3deef8226bd53a05b009da7ca64f8171192dc228 /src
parentade84a9889060239f7d6e9d5b4606487eccd06fe (diff)
minor selection fixes
do not consider "click + shift click" if there was a focus out in the meantime. disable selection on click when app steals the mouse
Diffstat (limited to 'src')
-rw-r--r--src/bin/termio.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 9897e49..c411ee2 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -3279,6 +3279,7 @@ _smart_cb_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
3279 3279
3280 edje_object_signal_emit(sd->cursor.obj, "focus,out", "terminology"); 3280 edje_object_signal_emit(sd->cursor.obj, "focus,out", "terminology");
3281 if (!sd->win) return; 3281 if (!sd->win) return;
3282 sd->pty->selection.last_click = 0;
3282 elm_win_keyboard_mode_set(sd->win, ELM_WIN_KEYBOARD_OFF); 3283 elm_win_keyboard_mode_set(sd->win, ELM_WIN_KEYBOARD_OFF);
3283 if (sd->khdl.imf) 3284 if (sd->khdl.imf)
3284 { 3285 {
@@ -3790,6 +3791,7 @@ _handle_mouse_down_single_click(Termio *sd,
3790 sd->pty->selection.makesel = EINA_TRUE; 3791 sd->pty->selection.makesel = EINA_TRUE;
3791 sd->didclick = !sd->pty->selection.is_active; 3792 sd->didclick = !sd->pty->selection.is_active;
3792 sd->pty->selection.is_active = EINA_FALSE; 3793 sd->pty->selection.is_active = EINA_FALSE;
3794 _sel_set(sd, EINA_FALSE);
3793 } 3795 }
3794} 3796}
3795 3797
@@ -3813,7 +3815,15 @@ _smart_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUS
3813 return; 3815 return;
3814 } 3816 }
3815 if (!shift && !ctrl) 3817 if (!shift && !ctrl)
3816 if (_rep_mouse_down(sd, ev, cx, cy)) return; 3818 if (_rep_mouse_down(sd, ev, cx, cy))
3819 {
3820 if (sd->pty->selection.is_active)
3821 {
3822 _sel_set(sd, EINA_FALSE);
3823 _smart_update_queue(data, sd);
3824 }
3825 return;
3826 }
3817 if (ev->button == 1) 3827 if (ev->button == 1)
3818 { 3828 {
3819 sd->pty->selection.makesel = EINA_TRUE; 3829 sd->pty->selection.makesel = EINA_TRUE;
@@ -3872,7 +3882,15 @@ _smart_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED
3872 3882
3873 _smart_xy_to_cursor(data, ev->canvas.x, ev->canvas.y, &cx, &cy); 3883 _smart_xy_to_cursor(data, ev->canvas.x, ev->canvas.y, &cx, &cy);
3874 if (!shift && !ctrl && !sd->pty->selection.makesel) 3884 if (!shift && !ctrl && !sd->pty->selection.makesel)
3875 if (_rep_mouse_up(sd, ev, cx, cy)) return; 3885 if (_rep_mouse_up(sd, ev, cx, cy))
3886 {
3887 if (sd->pty->selection.is_active)
3888 {
3889 _sel_set(sd, EINA_FALSE);
3890 _smart_update_queue(data, sd);
3891 }
3892 return;
3893 }
3876 if (sd->link.down.dnd) return; 3894 if (sd->link.down.dnd) return;
3877 if (sd->pty->selection.makesel) 3895 if (sd->pty->selection.makesel)
3878 { 3896 {