diff options
| author | Bert <ber.t@gmx.com> | 2011-02-19 23:07:10 +0100 | 
|---|---|---|
| committer | Bert <ber.t@gmx.com> | 2011-02-19 23:07:10 +0100 | 
| commit | a345c963f894626269c6f3581d1db982770bac7d (patch) | |
| tree | 41eba4943d3116ff7a37bf0afaf812907e8979e7 | |
| parent | 26bb005458ec83fbd4d4227b0b092353f3941633 (diff) | |
Double click thumb to open
| -rw-r--r-- | main.c | 13 | 
1 files changed, 9 insertions, 4 deletions
| @@ -501,10 +501,15 @@ void on_buttonpress(XButtonEvent *bev) {  		switch (bev->button) {  			case Button1:  				if ((sel = tns_translate(&tns, bev->x, bev->y)) >= 0) { -					fileidx = sel; -					load_image(); -					mode = MODE_NORMAL; -					win_set_cursor(&win, CURSOR_ARROW); +					if (sel == fileidx) { +						load_image(); +						mode = MODE_NORMAL; +						win_set_cursor(&win, CURSOR_ARROW); +					} else { +						tns_highlight(&tns, &win, fileidx, False); +						tns_highlight(&tns, &win, sel, True); +						fileidx = sel; +					}  					changed = 1;  					break;  				} | 
