Double click thumb to open
This commit is contained in:
parent
26bb005458
commit
a345c963f8
7
main.c
7
main.c
@ -501,10 +501,15 @@ void on_buttonpress(XButtonEvent *bev) {
|
|||||||
switch (bev->button) {
|
switch (bev->button) {
|
||||||
case Button1:
|
case Button1:
|
||||||
if ((sel = tns_translate(&tns, bev->x, bev->y)) >= 0) {
|
if ((sel = tns_translate(&tns, bev->x, bev->y)) >= 0) {
|
||||||
fileidx = sel;
|
if (sel == fileidx) {
|
||||||
load_image();
|
load_image();
|
||||||
mode = MODE_NORMAL;
|
mode = MODE_NORMAL;
|
||||||
win_set_cursor(&win, CURSOR_ARROW);
|
win_set_cursor(&win, CURSOR_ARROW);
|
||||||
|
} else {
|
||||||
|
tns_highlight(&tns, &win, fileidx, False);
|
||||||
|
tns_highlight(&tns, &win, sel, True);
|
||||||
|
fileidx = sel;
|
||||||
|
}
|
||||||
changed = 1;
|
changed = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user